Description Usage Arguments Value Examples
This function generates a rail plot demonstrating the nutrient balance of foods. All you need to do is input 2 nutrients and a grouping variable, and voila!
1 | Railfunction(data, x, y, id, group = FALSE)
|
data |
the dataframe holding your data |
x |
X axis nutrient (will be labelled on an energy (kCal) basis) |
y |
Y axis nutrient (will be labelled on an energy (kCal) basis) |
id |
an optional argument. Grouping variable or other indicator of multiple groups within your dataset. |
group |
Default is FALSE. Where group=FALSE, intake rail will be generated for entire dataset. Where group=TRUE, intake rail will be generated for each group. |
A complete plot demonstrating the intake rail(s), as well as the ratio of Nutrient X to Y
1 | Railfunction(baboondailyintake,carb,fat,individualname,group=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.