cat2list: Divides Data into Subsets by Factor

Description Usage Arguments Value Note Author(s)

Description

Converts data into a list form where data are grouped together by factor. Achieves the same objective as the base function split.

Usage

1
cat2list(x, a)

Arguments

x

name of the data variable to be processed.

a

name of the factor variable by which the data are to be split.

Value

data

a list containing factors as columns and the values for those factors as rows. The order of the resulting groups, subsets, is the order in which the factor variable names were encountered in parameter a passed to the function.

Note

This function is called by functions tbplots and bwplots to prepare Tukey boxplots and box-and-whisker plots, respectively. It is an integral part of the script shared by Doug Nychka on S-News, April 28, 1992. As such it may pre-date the time that split was added to the S-Plus library.

If by is undefined in the calling functions, tbplots and bwplots, the same result may be achieved by using the split(x, a) construct instead of stating x as the variable to be displayed as boxplots. In which case the data are grouped, subsetted, in alphabetical order of factor variable names.

Author(s)

Douglas W. Nychka


rgr documentation built on May 2, 2019, 6:09 a.m.

Related to cat2list in rgr...