Description Usage Arguments Details Author(s) Examples
Generates a plot for list from adult_weight
or
child_weight
.
1 2 3 |
model |
(list) List from Optional |
plotvars |
(vector) String vector of the plots to generate (default generates all) |
timevar |
(string) String indicating which of the variables in model list indicates time. |
title |
(string) Title of plot collection |
ncol |
(string) Number of columns to include in plot |
It returns a grid object
Rodrigo Zepeda-Tello rzepeda17@gmail.com
Dalia Camacho-García-Formentí daliaf172@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #EXAMPLE 1A: INDIVIDUAL MODELLING FOR ADULTS
#--------------------------------------------------------
mymodel <- adult_weight(80, 1.8, 40, "female", rep(-100, 365))
#You can plot all the variables
model_plot(mymodel)
#Or only one of them
model_plot(mymodel, "Body_Weight", ncol = 1)
#EXAMPLE 1C: INDIVIDUAL MODELLING FOR CHILDREN
#--------------------------------------------------------
mymodel <- child_weight(5, "female", 12, 4)
#You can plot all the variables
model_plot(mymodel)
#Or only one of them and specify by age
model_plot(mymodel, "Body_Weight", ncol = 1)
#EXAMPLE 2A: DATASET MODELLING FOR ADULTS
#--------------------------------------------------------
#Antropometric data
models <- c(45, 67, 58, 92, 81)
heights <- c(1.30, 1.73, 1.77, 1.92, 1.73)
ages <- c(45, 23, 66, 44, 23)
sexes <- c("male", "female", "female", "male", "male")
#Matrix of energy consumption reduction:
EIchange <- rbind(rep(-100, 365), rep(-200, 365), rep(-200, 365),
rep(-123, 365), rep(-50, 365))
#Returns a model change matrix and other matrices
model_model <- adult_weight(models, heights, ages, sexes,
EIchange)
#Create all plots
model_plot(model_model)
#Plot Body Mass Index
model_plot(model_model, "Body_Mass_Index")
#EXAMPLE 2C: DATASET MODELLING FOR CHILDREN
#--------------------------------------------------------
#Antropometric data
FatFree <- c(32, 17.2, 18.8, 20, 24.1)
Fat <- c(4.30, 2.02, 3.07, 1.12, 2.93)
ages <- c(10, 6.2, 5.4, 4, 4.1)
sexes <- c("male", "female", "female", "male", "male")
#Returns a model change matrix and other matrices
model_model <- child_weight(ages, sexes, Fat, FatFree)
#Create all plots
model_plot(model_model)
#Plot Body Mass Index
model_plot(model_model, "Fat_Mass")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.