load_icp: Load FFF-ICP data files with extension .csv

View source: R/load_icp.R

load_icpR Documentation

Load FFF-ICP data files with extension .csv

Description

Load FFF-ICP data files with extension .csv

Usage

load_icp(
  path,
  calibrate = TRUE,
  date_regex = "\\d{4}-\\d{2}-\\d{2}",
  date_format = "%Y-%m-%d",
  calib_path = NULL,
  keywords = NULL,
  data_format = "x-series II",
  int_stds = c("45Sc", "115In", "159Tb")
)

Arguments

path

Relative path to the ICP-MS (.csv) input files.

calibrate

Logical. Convert the raw instantaneous detector counts per second to instantaneous concentrations? For data_format = "x-series II", this requires a table for each date, in .xlsx format, with the following columns: file, a character vector of filenames; element, a character vector describing each calibration curve (e.g., ⁠56Fe⁠); defined, a numeric vector of defined standard concentrations; and mean_cps a numeric vector of mean counts per second at each concentration.

date_regex

An optional regular expression for extracting non-ISO dates from filenames.

date_format

An optional non-standard date format corresponding to the output of date_regex (see ?strptime).

calib_path

Optional. Use if the relative path to the ICP-MS calibration files differs from the relative path to the data files.

keywords

An optional vector of pattern matches to pass to stringr::str_detect() that tell load_icp() which files to load. These can be regular expressions.

data_format

Selects an appropriate readr function based on the data format. Current options are "x-series II" and "iCAP-RQ".

int_stds

A character vector of internal standards to omit from the output when calibrate = TRUE.

Value

A tibble with the columns 'file', 'date', 'param', 'time', and 'conc'.

Examples

path <- system.file("extdata", package = "fffprocessr")
load_icp(path = path)

bentrueman/fffprocessr documentation built on June 23, 2024, 1:23 a.m.