Learn R Programming

specmine (version 1.0)

replace_data_value: Replace data value

Description

Replace a data value for a new value on the dataset.

Usage

replace_data_value(dataset, x.axis.val, sample, new.value, by.index = F)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
x.axis.val
variable index or name.
sample
sample name.
new.value
new value to replace the old value.
by.index
boolean value to indicate if the x.axis.val is an index or not.

Value

Returns the dataset with the data value replaced.

Examples

Run this code
  ## Example of replacing a data value from the dataset
  data(cachexia)
  dataset = replace_data_value(cachexia, "Creatine", "PIF_178", 10.3, 
	    by.index = FALSE)

Run the code above in your browser using DataLab