Learn R Programming

specmine (version 3.1.6)

remove_variables_by_nas: Remove variables by NAs

Description

Remove variables from the dataset by the number of NAs

Usage

remove_variables_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 variables with more NAs than the limit removed.

Examples

Run this code
# NOT RUN {
  ## Example of removing variables by NAs
  library(specmine.datasets)
  data(propolis)
  propolis = remove_variables_by_nas(propolis, 40, by.percent = TRUE)
# }

Run the code above in your browser using DataLab