Learn R Programming

RBaM (version 1.1.1)

violinPlot: violinPlot

Description

returns a violinplot ggplot

Usage

violinPlot(sim, ylab = "values", col = "black")

Value

A ggplot

Arguments

sim

vector or matrix or data frame, MCMC simulations

ylab

Character, label of y-axis

col

Color

Examples

Run this code
# Create Monte Carlo samples
n=1000
sim=data.frame(p1=rnorm(n),p2=rlnorm(n),p3=runif(n))
# create violin plot comparing all components
figure=violinPlot(sim)

Run the code above in your browser using DataLab