umx_scale_wide_twin_data | R Documentation |
Scale wide data across all twins. You offer up a list of variables to scale, e.g. c("DEP", "bmi")
and the separator (e.g. sep = "_T"
) and twin suffixes e.g. 1:2 that paste together to make
complete variable names: e.g. "DEP_T1" and "DEP_T2".
umx_scale_wide_twin_data(varsToScale, sep, data, twins = 1:2)
varsToScale |
The base names of the variables ("weight" etc.) |
sep |
The suffix that distinguishes each case, e.g. "_T") |
data |
A wide dataframe |
twins |
Legal digits following sep (default 1:2) |
dataframe with varsToScale standardized
umx_scale
Other Twin Data functions:
umx_long2wide()
,
umx_make_TwinData()
,
umx_make_twin_data_nice()
,
umx_residualize()
,
umx_wide2long()
,
umx
data(twinData)
df = umx_scale_wide_twin_data(data = twinData, varsToScale = c("ht", "wt"), sep = "")
plot(wt1 ~ wt2, data = df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.