umx_apply | R Documentation |
Tries to make apply more readable. so "mean of x by columns", instead of "of x, by 2, mean"
Other functions to think of include:
cumsum()
, rowSums()
, colMeans()
, etc.
umx_apply(FUN, of, by = c("columns", "rows"), ...)
FUN |
The function to apply. |
of |
The dataframe to work with. |
by |
Apply the function to columns or to rows (default = "columns") |
... |
optional arguments to FUN, e.g., na.rm = TRUE. |
object
umx_aggregate()
Other Miscellaneous Stats Functions:
FishersMethod()
,
SE_from_p()
,
geometric_mean()
,
harmonic_mean()
,
oddsratio()
,
reliability()
,
umxCov2cor()
,
umxHetCor()
,
umxParan()
,
umxWeightedAIC()
,
umx_cor()
,
umx_means()
,
umx_r_test()
,
umx_round()
,
umx_scale()
,
umx_var()
,
umx
umx_apply(mean, mtcars, by = "columns")
umx_apply("mean", of = mtcars, by = "columns")
tmp = mtcars[1:3,]; tmp[1,1] = NA
umx_apply("mean", by = "rows", of = tmp)
umx_apply("mean", by = "rows", of = tmp, na.rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.