checkSets: Check structure and retrieve sizes of a group of datasets.

Description Usage Arguments Details Value Author(s)


Checks whether given sets have the correct format and retrieves dimensions.


checkSets(data, checkStructure = FALSE, useSets = NULL)



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.


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.


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


Number of sets (length of the vector data).


Number of columns in the data components in the lists. This number must be the same for all sets.


A vector of length nSets giving the number of rows in the data components.


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,

Search within the WGCNA package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.