Learn R Programming

specmine (version 1.0)

x_values_to_indexes: Get x-values indexes

Description

Returns the indexes corresponding to a vector of x-values (only to numerical values - spectra)

Usage

x_values_to_indexes(dataset, x.values)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
x.values
vector of x-values.

Value

Returns a numeric vector with the indexes of the x-values.

Examples

Run this code
  ## Example of getting the indexes of the x-values 
  data(propolis)
  indexes = x_values_to_indexes(propolis, c(1.3, 3.51, 6.03))

Run the code above in your browser using DataLab