rf-web/vendor/bundle/gems/rouge-3.12.0/lib/rouge/demos/r

9 lines
136 B
Plaintext
Raw Normal View History

2019-10-21 08:18:17 +00:00
dbenford <- function(x){
log10(1 + 1/x)
}
pbenford <- function(q){
cumprobs <- cumsum(dbenford(1:9))
return(cumprobs[q])
}