umx (version 1.9.1)

umx_round: umx_round

Description

A version of round() which works on dataframes that contain non-numeric data (or data that cannot be coerced to numeric) Helpful for dealing with table output that mixes numeric and string types.

Usage

umx_round(df, digits = getOption("digits"), coerce = FALSE)

Arguments

df

a dataframe to round in

digits

how many digits to round to (defaults to getOption("digits"))

coerce

whether to make the column numeric if it is not (default = FALSE)

Value

- mxModel

References

- http://www.github.com/tbates/umx

See Also

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_scale_wide_twin_data, umx_scale, umx_swap_a_block, umx_wide2long, umx

Examples

Run this code
# NOT RUN {
head(umx_round(mtcars, coerce = FALSE))
head(umx_round(mtcars, coerce = TRUE))
# }

Run the code above in your browser using DataCamp Workspace