plot_density2: Generate density plot

View source: R/plot_density2.R

plot_density2R Documentation

Generate density plot

Description

Generates a violin plot where violins represent the posterior probability of resistance and points represent the calculated probability of resistance to each antibiotic class. If a file already exists, it is read into memory.

Usage

plot_density2(model, data, save_to, filename, save_pdf = FALSE)

Arguments

model

a runjags object containing model results

data

a list containing the data input for the runjags model, generated with jags_data()

save_to

a string specifying the location in which the output (an rds file containing the density plot) should be saved

filename

a string specifying the name of the output (an rds file containing the density plot)

save_pdf

a boolean specifying whether or not a pdf should be saved

Value

Returns a density plot and saves an rds file


soniamitchell/SpARKjags documentation built on May 5, 2022, 12:09 p.m.