Learn R Programming

umx (version 1.9.1)

umxCovData: Convert a dataframe into a cov mxData object

Description

umxCovData converts a dataframe into an mxData, taking the covariance, defaulting to nrow as the numObs, and optionally adding means.

Usage

umxCovData(df, columns = NA, use = c("complete.obs", "everything",
  "all.obs", "na.or.complete", "pairwise.complete.obs"))

Arguments

df

the dataframe to covert to an mxData type cov object.

columns

= Which columns to keep (default is all).

use

= Default is "complete.obs".

Value

- mxData of type = cov

References

- https://github.com/tbates/umx, https://tbates.github.io

See Also

Other Data Functions: 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_scale, umx_swap_a_block, umx_wide2long, umx

Examples

Run this code
# NOT RUN {
umxCovData(mtcars, c("mpg", "hp"))
# }

Run the code above in your browser using DataLab