densityPlot: densityPlot

View source: R/RUI.R

densityPlotR 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)

BaM-tools/RBaM documentation built on April 11, 2025, 10:01 p.m.