Learn R Programming

specmine (version 3.1.6)

subset_random_samples: Subset random samples

Description

Gets a subset of random samples from the dataset.

Usage

subset_random_samples(dataset, nsamples)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

nsamples

integer representing the number of samples that we want to get.

Value

Returns the dataset with a number of random samples.

Examples

Run this code
# NOT RUN {
  ## Example of subsetting random samples
  library(specmine.datasets)
  data(cachexia)
  subset = subset_random_samples(cachexia, 15)
# }

Run the code above in your browser using DataLab