inst/samples/dg.R

dg <- function(x, a, b) {
    l <- max(length(x), length (a), length(b))
    a <- rep(a,l)[1:l]
    b <- rep(b,l)[1:l]
    x <- rep(x,l)[1:l]
    dgamma(x, a, b)
}

n <- 10000
x <- seq(0, 10, len = n)
R <- 20
for (i in 1 : R) dg(x, 2, 3)

Try the proftools package in your browser

Any scripts or data that you put into this service are public.

proftools documentation built on July 8, 2020, 5:20 p.m.