Returns a data frame from stats::density function

create.density.df(samps = NULL, zero.bounded = FALSE,
  distribution = NULL, n = 1000, ...)

Arguments

samps

a vector of samples from a distribution

zero.bounded
distribution

list with elements distn, parama, paramb, e.g. list('norm', 0, 1)

Value

data frame with x and y = dens(x)

Examples

# NOT RUN {
prior.df <- create.density.df(distribution = list('norm',0,1))
plot(prior.df)
samp.df <- create.density.df(samps = rnorm(100))
lines(samp.df)
# }