Skip to contents

This function will automatically scale your data based on the normalization method you choose. It will also calculate the CVs for each sample and each metabolite.

Usage

auto_scale(
  data,
  sample_information,
  is_to_use = "",
  pref_to_use = "PREFA",
  prefs_to_remove = "",
  normalization = c("IS", "NN"),
  pool_missing_p = 100,
  fill_method = "none",
  smooth_method = "lowess"
)

Arguments

data

A data frame of the data to be normalized. This should be the output of the read_data function.

sample_information

A data frame of the sample information. This should be the output of the read_sample_information function.

is_to_use

A vector of the internal standards to use for normalization. If you do not want to use internal standards, leave this blank.

pref_to_use

A string of the preferred reference to use for normalization. If you do not want to use a preferred reference, leave this blank.

prefs_to_remove

A vector of the preferred references to remove from the data. If you do not want to remove any preferred references, leave this blank.

normalization

A string of the normalization method to use. This can be "IS", "NN", or "SMOOTH".

pool_missing_p

A numeric value indicating the percentage of missing pools allowed before skipping normalization (0-100).

fill_method

A string indicating how to fill missing values. This can be "half-min" or "none".

smooth_method

A string indicating the smoothing method to use. This can be "lowess", "line", "spline", or "gaussian".

Value

A data frame of the normalized data.