replace_data_value: Replace data value

Description Usage Arguments Value Examples

Description

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

Usage

1
2
replace_data_value(dataset, x.axis.val, sample, new.value, 
by.index = FALSE)

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

1
2
3
4
5
  ## Example of replacing a data value from the dataset
  library(specmine.datasets)
  data(cachexia)
  dataset = replace_data_value(cachexia, "Creatine", "PIF_178", 10.3, 
	    by.index = FALSE)

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