prepare_data | R Documentation |
prepare data for repeated iteration process
prepare_data( data, group = NULL, subject = "SIC", sex = NULL, value = "value", age = "age", lb = -Inf, ub = Inf )
data |
dataframe containing measurement values, age, sex, and subject identifier |
group |
optional variable indicating groups of subjects within the data frame in most cases (families) |
subject |
subject identifier |
sex |
column containing the sex (or any other stratum), ideally of type character, iteration process will run on each of the levels separately |
value |
numeric column containing the measurement values |
age |
numeric column containing the age |
lb |
optional - lower bound for age |
ub |
optional - upper bound for age |
given a dataframe, the column name of the subject identifier, sex, age, value and group colums, the function creates a dataframe containing only these five columns with the standard column names group, subject, sex, age, value. lines containing missing values are removed.
list of dataframes containing the columns group, subject, sex, age, value; one dataframe for every level of sex
Mandy Vogel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.