Learn R Programming

specmine (version 4.0.0)

get_peak_values: Auto-exported function: get_peak_values

Description

Auto-exported function: get_peak_values

Usage

get_peak_values(samples.df, peak.val)

Value

A numeric vector with the intensity values for the peak specified by peak.val across all samples in samples.df.

Arguments

samples.df

A data frame of peak intensities with peaks in rows and samples in columns.

peak.val

Peak value identifying the row to extract.

Examples

Run this code
samples.df <- data.frame(
  s1 = c(10, 20),
  s2 = c(15, NA),
  row.names = c("1", "2")
)
get_peak_values(samples.df, "1")

Run the code above in your browser using DataLab