powered by
umx_scale applies scale to a data.frame. It scale numeric columns, and is smart enough to skip non-scalable columns (string, factor, etc.).
umx_scale(df, varsToScale = NULL, coerce = FALSE, attr = FALSE, verbose = FALSE)
A dataframe to scale (or a numeric vector)
(leave blank to scale all)
Whether to coerce non-numerics to numeric (Defaults to FALSE)
to strip off the attributes scale creates (FALSE by default)
Whether to report which columns were scaled (default FALSE)
- new dataframe with scaled variables
Also strips-off the attributes which scale adds ("scaled:center" and "scaled:scale" (set attr= TRUE) to keep these.
- http://www.github.com/tbates/umx
umx_scale_wide_twin_data
Other Data Functions: umxCovData, umxFactor, umxHetCor, umxPadAndPruneForDefVars, umx_as_numeric, umx_cont_2_quantiles, umx_cov2raw, umx_long2wide, umx_lower2full, umx_make_MR_data, umx_make_TwinData, umx_make_bin_cont_pair_data, umx_make_fake_data, umx_merge_CIs, umx_read_lower, umx_reorder, umx_residualize, umx_round, umx_scale_wide_twin_data, umx_swap_a_block, umx_wide2long, umx
umxCovData
umxFactor
umxHetCor
umxPadAndPruneForDefVars
umx_as_numeric
umx_cont_2_quantiles
umx_cov2raw
umx_long2wide
umx_lower2full
umx_make_MR_data
umx_make_TwinData
umx_make_bin_cont_pair_data
umx_make_fake_data
umx_merge_CIs
umx_read_lower
umx_reorder
umx_residualize
umx_round
umx_swap_a_block
umx_wide2long
umx
# NOT RUN { data(twinData) df = umx_scale(twinData, varsToScale = c("wt1", "wt2")) df = umx_scale(twinData, attr= TRUE) plot(wt1 ~ wt2, data = df) # }
Run the code above in your browser using DataLab