Overview
The TeenGrowth package includes functions for:
Cleaning and processing growth data.
Calculating Body Mass Index (BMI) and BMI z-scores (BMIZ).
Forecasting growth metrics.
Visualizing growth data and weight restoration plans.
Installation
To install the package using the `install_github` function: use the following code:
devtools::install.packages("remotes")
library(remotes)
install_github("embark-lab/embarktools")
install_github("embark-lab/TeenGrowth")
Usage
Here is a brief example of how to use the TeenGrowth package:
# Load the package
library(TeenGrowth)
# Example data
data <- read.csv("path/to/your/data.csv")
# Clean the data
cleaned_data <- clean_raw_data(data)
# Forecast BMI
bmi_forecast <- forecast_bmi(clean_data)
# Plot the results of participant # 1
plot_eBMI(clean_data = cleaned_data, forecast_data = bmi_forecast, px = 1)
For a more detailed outline of how to use the R package, refer to the package vignette.
Shiny Application
For clinical application, the TeenGrowth package includes a Shiny application to provide an interactive interface for data input, model selection, and weight restoration planning.
Shiny App Structure
The Shiny application is structured into several tabs:
Data Input: Upload your data file (CSV or Excel) or use provided demo data.
Data Specification: Map your data columns to the required fields.
Model Selection: Select a model to run on your data and view the predictions.
Weight Restoration Planning: Plan a weight restoration strategy based on the predictions.
Background and FAQ: Provides additional information and usage instructions.
Example Workflow in the Shiny App
Data Input: Upload your data or select demo data.
Data Specification: Specify the columns corresponding to required fields.
Model Selection: Select a model and generate predictions.
Weight Restoration Planning: Input relevant parameters and visualize the restoration plan.