var2fact: Rearranges Data for Variables as Factors
Description
Rearranges data from a matrix or dataframe into a matrix where data are tagged by their variables names as factors. Used to concatenate data for display with functions tbplot.by.var and bwplot.by.var.
Usage
var2fact(xmat)
Arguments
xmat
name of the n x m data matrix or dataframe to be processed.
Value
xxa n * m by 2 matrix where each of the n * m rows contains a value that is paired with its variable name as a factor, see Note below.
Details
If the data for only some of the variables available in an attached matrix or dataframe are to be processed use the cbind construct. Thus, temp.mat <- cbind(varname1, varname3, varname6, varname8).