checkSets {moduleColor} | R Documentation |
Checks whether given sets have the correct format and retrieves dimensions.
checkSets(data, checkStructure = FALSE, useSets = NULL)
data |
A vector of lists; in each list there must be a component named data whose content
is a matrix or dataframe or array of dimension 2. |
checkStructure |
If FALSE , incorrect structure of data will trigger an error. If
TRUE , an appropriate flag (see output) will be set to indicate whether data has correct
structure. |
useSets |
Optional specification of entries of the vector data that are to be checked.
Defaults to all components. This may be useful when data only contains information for some
of the sets. |
For multiset calculations, many quantities (such as expression data, traits, module eigengenes etc) are
presented by a common structure, a vector of lists (one list for each set) where each list has a
component data
that contains the actual (expression, trait, eigengene) data for the corresponding
set in the form of a dataframe. This funtion checks whether data
conforms to this convention and
retrieves some basic dimension information (see output).
A list with components
nSets |
Number of sets (length of the vector data ). |
nGenes |
Number of columns in the data components in the lists. This number must be the
same for all sets. |
nSamples |
A vector of length nSets giving the number of rows in the data
components. |
structureOK |
Only set if the argument checkStructure equals TRUE .
The value is TRUE if the paramter data passes a few tests of its
structure, and FALSE otherwise. The tests are not exhaustive and are meant to catch obvious user
errors rather than be bulletproof. |
Peter Langfelder, Peter.Langfelder@gmail.com