BY: Analysis BY variable

View source: R/BY.R

BYR Documentation

Analysis BY variable

Description

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

Usage

  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

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

sasLM documentation built on Oct. 2, 2024, 9:06 a.m.