Learn R Programming

specmine (version 3.1.6)

remove_samples_by_na_metadata: Remove samples by NA on metadata

Description

Remove samples from the dataset with the metadata's variable value with NAs.

Usage

remove_samples_by_na_metadata(dataset, metadata.var)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

metadata.var

metadata's variable.

Value

Returns the dataset with the samples with NA on metadata's variable removed.

Examples

Run this code
# NOT RUN {
  ## Example of removing samples that have NAs on metadata's variable
  library(specmine.datasets)
  data(cachexia)
  cachexia$metadata$Muscle.loss[10] = NA
  cachexia = remove_samples_by_na_metadata(cachexia, "Muscle.loss")
# }

Run the code above in your browser using DataLab