remove_samples_by_nas: Remove samples by NAs

Description Usage Arguments Value Examples

Description

Remove samples from the dataset by the number of NAs

Usage

1
remove_samples_by_nas(dataset, max.nas = 0, by.percent = FALSE)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

max.nas

number of NAs (or percentage) to which samples with more NAs will be removed.

by.percent

if TRUE the max.nas argument is a percentage.

Value

Returns the dataset with the samples with more NAs than the limit removed.

Examples

1
2
3
4
  ## Example of removing samples by NAs
  library(specmine.datasets)
  data(propolis)
  propolis = remove_samples_by_nas(propolis, 40, by.percent = TRUE)

specmine documentation built on Sept. 21, 2021, 5:06 p.m.