process: Pb-Pb data processing

View source: R/PbPbRedux.R

processR Documentation

Pb-Pb data processing

Description

High level functionthat takes samples, blanks and spikes as input and produces a table of Pb/Pb ratios, uncertainties and error correlations as output

Usage

process(samples, blanks, spikes, cblanks, ierr = 4)

Arguments

samples

data frame with sample data. For an example, see system.file("samples1.csv",package="PbPbRedux")

blanks

data frame with blank data. For an example, see system.file("blanks1.csv",package="PbPbRedux")

spikes

data frame with spike data. For an example, see system.file("spikes.csv",package="PbPbRedux")

cblanks

data frame with replicate blank data. For an example, see system.file("blanks2.csv",package="PbPbRedux")

ierr

indicates whether the analytical uncertainties are reported as:

1: 1\sigma absolute uncertainties.

2: 2\sigma absolute uncertainties.

3: 1\sigma relative uncertainties (\%).

4: 2\sigma relative uncertainties (\%).

Value

a table with Pb concentrations, Pb/Pb ratios and error correlations

Examples

library(PbPbRedux)

s1 <- system.file("samples1.csv",package="PbPbRedux")
s2 <- system.file("samples2.csv",package="PbPbRedux")
b1 <- system.file("blanks1.csv",package="PbPbRedux")
b2 <- system.file("blanks2.csv",package="PbPbRedux")
sp <- system.file("spikes.csv",package="PbPbRedux")

spikes <- read.csv(sp,header=TRUE)

# example 1: all samples use the same blank:
samples <- read.csv(s1,header=TRUE)
blanks <- read.csv(b1,header=TRUE)
tab <- process(samples,blanks,spikes)

# example 2: each aliquot has its own blank:
samples <- read.csv(s2,header=TRUE)
blanks <- read.csv(b2,header=TRUE)
tab <- process(samples,blanks,spikes)

# example 3: individual blanks with shared covariance matrix:
samples <- read.csv(s2,header=TRUE)
cblanks <- read.csv(b1,header=TRUE)
blanks <- read.csv(b2,header=TRUE)
tab <- process(samples,blanks,spikes,cblanks)


pvermees/PbPbRedux documentation built on Aug. 27, 2023, 11:22 a.m.