powered by
returns a histogram+density ggplot (or a list thereof if several columns in sim)
densityPlot(sim, xlab = "values", col = "black")
A ggplot (or a list thereof if several columns in sim)
vector or matrix or data frame, MCMC simulations
Character, label of x-axis to be used if sim has no names
Color
# Create Monte Carlo samples n=1000 sim=data.frame(p1=rnorm(n),p2=rlnorm(n),p3=runif(n)) # create density plot for each component figures=densityPlot(sim)
Run the code above in your browser using DataLab