Learn R Programming

robustlmm (version 3.3-1)

splitDatasets: Split Datasets Into Chunks

Description

Method that splits up dataset objects into smaller chunks, so that they can be processed separately.

Usage

splitDatasets(datasets, chunkSize = 50)

Value

list of dataset lists with generators and the contents of the original dataset. See prepareMixedEffectDataset and

generateAnovaDatasets for a description of the contents. There is one additional entry in the list:

chunkIndex:

index of the chunk

Arguments

datasets

dataset object to split into chunks

chunkSize

number of datasets to keep in one chunk

Author

Manuel Koller

See Also

bindDatasets

Examples

Run this code
  oneWay <- generateAnovaDatasets(18, 1, 5, 4)
  datasetList <- splitDatasets(oneWay, 5)
  data <- datasetList[[4]]$generateData(1)
  stopifnot(all.equal(oneWay$generateData(16), datasetList[[4]]$generateData(1),
                      check.attributes = TRUE),
            all.equal(oneWay$sphericalRandomEffects(16),
                      datasetList[[4]]$sphericalRandomEffects(1)),
            all.equal(oneWay$createXMatrix(data), datasetList[[4]]$createXMatrix(data)),
            all.equal(oneWay$createZMatrix(data), datasetList[[4]]$createZMatrix(data)))

Run the code above in your browser using DataLab