LMK_grp_apply: Group Apply

Description Usage Arguments Examples

View source: R/package-support.R

Description

Apply a function (f) to a set of data (d) by a grouping variable (grp). Calculates values within group (eg mean), as well as for the entire ungrouped sample (eg, grand mean).

Usage

1
LMK_grp_apply(d, f, grp)

Arguments

d

a dataset

f

a function

grp

a grouping variable

Examples

1
2
data(iris)
LMK_grp_apply(d = iris[,1:4], f = mean, grp = iris$species) 

ehrlichd/lmkCHK documentation built on Sept. 30, 2020, 3:06 a.m.