Learn R Programming

specmine (version 3.1.6)

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 = 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

Run this code
# NOT RUN {
  ## 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)
# }

Run the code above in your browser using DataLab