Hello RStudio Community-
I am in a bit of a bind-- I have to fix this figure ASAP, and I am still on the R learning curve.
I am running a Bayesian mixing model. (simmr) The model runs great, and outputs are good.
One of the outputs is a simple box plot. It looks like it was generated from ggplot, but I cannot figure out how to change the title or the y axis limits (I want 0.0 to 1.0).
So the questions are: how do I manage the outputs from the model, and more importantly: how do I use ggplot to modify this plot?
Thank you.
The boxplot:
The reprexed code:
### Setup the model
well_simmr <- simmr_load(mixtures = as.matrix(targets[, 1:2]),
source_names = sources$Sources,
source_means = as.matrix(sources[,2:3]),
source_sds = as.matrix(sources[,4:5]),
#correction_means = as.matrix(tefs[,2:3]),
#correction_sds = as.matrix(tefs[,4:5]),
#concentration_means = as.matrix(concep[,2:3]),
group = targets$well)
#> Error in simmr_load(mixtures = as.matrix(targets[, 1:2]), source_names = sources$Sources, : could not find function "simmr_load"
### Run through simmr:
well_simmr_out <- simmr_mcmc(well_simmr)
#> Error in simmr_mcmc(well_simmr): could not find function "simmr_mcmc"
summary(well_simmr_out, type = 'diagonostics', group = 7)
#> Error in summary(well_simmr_out, type = "diagonostics", group = 7): object 'well_simmr_out' not found
### Group comparison plots
compare_groups(well_simmr_out, groups = 1:7, source_name = 'NH4 Fertilizer', plot = TRUE)
#> Error in compare_groups(well_simmr_out, groups = 1:7, source_name = "NH4 Fertilizer", : could not find function "compare_groups"
Created on 2021-09-08 by the reprex package (v2.0.1)