A class that contains a dataset where its samples are stored in memory (RAM). This is usually faster than storing them on files, but the size of the dataset becomes limited by the amount of RAM available.

Details

This class is not exported, but if you want to use it reach us at https://github.com/sipss/GCIMS/issues/ and we will export it.

Super class

GCIMS::DelayedDatasetBase -> DelayedDatasetRAM

Active bindings

sampleNames

The character vector with unique sample names.

Methods

Inherited methods


Method new()

Create a delayed dataset on RAM

Usage

DelayedDatasetRAM$new(samples, sample_class = NULL)

Arguments

samples

A named list of samples.

sample_class

The class of the samples in the dataset, used just to validate the contract between the delayed actions and the samples. If NULL action return values are not checked


Method getSample()

Get a sample from the dataset

Usage

DelayedDatasetRAM$getSample(sample, dataset)

Arguments

sample

Either an integer (sample index) or a string (sample name)

dataset

The dataset so we can realize if there are enqueued actions

Returns

The sample object


Method subset()

Subsets some samples

Usage

DelayedDatasetRAM$subset(sample)

Arguments

sample

A numeric vector with indices, a character vector with names or a logical vector

Returns

the delayed dataset modified in-place


Method clone()

The objects of this class are cloneable with this method.

Usage

DelayedDatasetRAM$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.