Learn R Programming

umx (version 4.0.0)

umx_means: umx_means

Description

Helper to get means from a df that might contain ordered or string data. Factor means are set to "ordVar"

Usage

umx_means(df, ordVar = 0, na.rm = TRUE)

Arguments

df

a dataframe of raw data from which to get variances.

ordVar

value to return for the means of factor data = 0

na.rm

passed to mean - defaults to "na.rm"

Value

- frame of means

See Also

Other Miscellaneous Stats Helpers: FishersMethod(), SE_from_p(), oddsratio(), reliability(), umxCov2cor(), umxHetCor(), umxWeightedAIC(), umx_apply(), umx_cor(), umx_r_test(), umx_round(), umx_scale(), umx_var(), umx

Examples

Run this code
# NOT RUN {
tmp = mtcars[,1:4]
tmp$cyl = ordered(mtcars$cyl) # ordered factor
tmp$hp  = ordered(mtcars$hp)  # binary factor
umx_means(tmp, ordVar = 0, na.rm = TRUE)
# }

Run the code above in your browser using DataLab