compute.group.variable: Calculate Subgroup Variable

View source: R/compute.group.variable.R

compute.group.variableR Documentation

Calculate Subgroup Variable

Description

Calculate subgroup variable using an arbitrary function.

Usage

compute.group.variable(
  fx,
  data = NULL,
  FUN = function(x) {
     x
 }
)

Arguments

fx

Formula - defines formula for dependent variable and subgroups ( dv ~ v1 + v2 + ...)

data

Data Frame - data frame with columns corresponding to variables in fx.

FUN

Function - A function(x) where x is subgroup values that returns a vector that is the same length as x.

Value

A vector the same length as rows in data containing the results of the subgroup calculation.


burrm/lolcat documentation built on Sept. 15, 2023, 11:35 a.m.