create.density.df.Rd
Returns a data frame from stats::density function
create.density.df(samps = NULL, zero.bounded = FALSE, distribution = NULL, n = 1000, ...)
samps | a vector of samples from a distribution |
---|---|
zero.bounded | |
distribution | list with elements distn, parama, paramb,
e.g. |
data frame with x and y = dens(x)
# 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) # }