mxc_master: MxC Master Function

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/mxc_master.R

Description

This function will run the entire Mexico City Data Analysis and write the results.

Usage

1
mxc_master(folderwithrawrun)

Arguments

name

String name of folder with the runs eg. "Baseline"

Details

Your current working directory should contain Folders of all the Experiments you would like to analyse.\n Method: This function has multiple steps, depending on the specifications. It will call several other functions to carry out these steps in the following order.\n Step 1: If the files are zipped, unzip them.\n Step 2: Rename the individual run files for clarity. Runs will be named "mxc run_1.csv" to "mxc run_N.csv" for N individual runs. Step 3: Call the mulruns function, which will process the individual runs, average the results accross all runs and save the results file for physical activity times, and events.\n Step 4: Call the mxc_bmi function which will similarly deal with the BMI processing, and save the relevant output files.\n Step 5: Run the mxc_extrend function which will write BMI trajectory over five years and delete the original run files.\n Step 6: Run the mxc_plot function, which will plot the BMI trends for the 5yr runs.\n \n Assumptions this function makes.\n => This function assumes that there are 218 164 adolescents in each run. => This function assumed that each run was conducted for 5 years. mxc_master()

Value

Will write multiple .csv files into the Folders with the experiments. This package will also delete the original files. Ensure that if you want to run the .csvs again you keep copies of the files in seperate folders.

Author(s)

Sindiso Nyathi

See Also

mxc_mulruns, mxc_bmi, mxc_extrend

Examples

1
2
mxc_master("Baseline")
mxc_master("Intervention 1")

SindisoNyathi/MxC documentation built on May 20, 2019, 9:13 p.m.