densityPlot {RBaM} | R Documentation |
densityPlot
Description
returns a histogram+density ggplot (or a list thereof if several columns in sim)
Usage
densityPlot(sim, xlab = "values", col = "black")
Arguments
sim |
vector or matrix or data frame, MCMC simulations |
xlab |
Character, label of x-axis to be used if sim has no names |
col |
Color |
Value
A ggplot (or a list thereof if several columns in sim)
Examples
# 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)
[Package RBaM version 1.0.1 Index]