Learn R Programming

rgr (version 1.1.15)

cat2list: Divides Data into Subsets by Factor

Description

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

Usage

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.