prepare_data {childsds} | R Documentation |
prepare data for iteration process
Description
prepare data for repeated iteration process
Usage
prepare_data(
data,
group = NULL,
subject = "SIC",
sex = NULL,
value = "value",
age = "age",
lb = -Inf,
ub = Inf
)
Arguments
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 |
Details
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.
Value
list of dataframes containing the columns group, subject, sex, age, value; one dataframe for every level of sex
Author(s)
Mandy Vogel