View source: R/plot_delta_tracers.R
plot_delta_tracers | R Documentation |
Plot the posterior distribution of magnification or enrichment for specified tracers
plot_delta_tracers(myfit, mydata, trac_names, transfo = list(NULL))
myfit |
a fit as returned by |
mydata |
a list as returned by |
trac_names |
a character or vector list containing the tracers to be plotted |
transfo |
either NULL or a list of functions, on per tracer, to carry transformation if required |
a list of the same length as trac_names with a ggplot
#importing data data(signature_data) data(prior_diet_matrix) data(LOQ) data(prior_signature_data) prior_delta <- data.frame(tracer=c("X15N","X13C"),mean=c(3,0),sd=c(1,1)) #check that everything is ok mydata <- prepare_data(prior_diet_matrix,signature_data, LOQ,prior_signature_data,prior_delta) #build the model mymodel <- building_model(mydata) #fit the model myresults <- fit_escroc(mydata, mymodel) #a function to compute TMF () transfo <- function (x) 10^x #plot diet print(plot_delta_tracers(myresults,mydata,"FOSA",list(transfo)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.