View source: R/plot_diet_species.R
| plot_diet_species | R Documentation |
Plot the diet composition of asked species
plot_diet_species(mydata, myres, spec_names)
mydata |
a list as returned by function |
myres |
a fit as returned by |
spec_names |
a character or vector list containing the species names to be plotted |
a list of the same length as spec_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)
#plot diet
print(plot_diet_species(mydata, myresults, "Sole"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.