var2fact: Rearranges Data for Variables as Factors
Description
Rearranges data from a matrix or data frame into a matrix where data are tagged by their variables names as factors. Used to concatenate data for display with functions tbplots.by.var and bwplots.by.var.
Usage
var2fact(xmat)
Arguments
xmat
name of the n by p data matrix or data frame to be processed.
Value
xx
a n * p by 2 matrix where each of the n * p 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 data frame are to be processed use the cbind construct. Thus, temp.mat <- cbind(vname1, vname3, vname6, vname8).