BY: Analysis BY variable

Description Usage Arguments Details Value Author(s) Examples

View source: R/BY.R

Description

GLM, REG, aov1 etc. functions can be run by levels of a variable.

Usage

1
BY(FUN, Formula, Data, By, ...)

Arguments

FUN

Function name to be called such as GLM, REG

Formula

a conventional formula for a linear model.

Data

a data.frame to be analyzed

By

a variable name in the Data

...

arguments to be passed to FUN function

Details

This mimics SAS procedues' BY clause.

Value

a list of FUN function outputs. The names are after each level.

Author(s)

Kyun-Seop Bae k@acr.kr

Examples

1
2
BY(GLM, uptake ~ Treatment + as.factor(conc), CO2, By="Type")
BY(REG, uptake ~ conc, CO2, By="Type")

sasLM documentation built on July 14, 2021, 9:07 a.m.