read.data: Read geochronology data

Description Usage Arguments Details Value See Also Examples

View source: R/io.R

Description

Cast a .csv file or a matrix into one of IsoplotR's data classes

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
read.data(x, ...)

## Default S3 method:
read.data(x, method = "U-Pb", format = 1, ierr = 1,
  ...)

## S3 method for class 'data.frame'
read.data(x, method = "U-Pb", format = 1,
  ierr = 1, ...)

## S3 method for class 'matrix'
read.data(x, method = "U-Pb", format = 1, ierr = 1,
  ...)

Arguments

x

either a file name (.csv format) OR a matrix

...

optional arguments to the read.csv function

method

one of 'U-Pb', 'Pb-Pb', 'Ar-Ar', 'detritals', Rb-Sr, Sm-Nd, Re-Os, Th-U, 'U-Th-He', 'fissiontracks' or 'other'

format

formatting option, depends on the value of method.

if method='U-Pb', then format is one of either:

  1. 7/5, err[7/5], 6/8, err[6/8], rho

  2. 8/6, err[8/6], 7/6, err[7/6] (, rho)

  3. X=7/6, err[X], Y=7/5, err[Y], Z=6/8, err[Z] (, rho[X,Y]) (, rho[Y,Z])

  4. X=7/5, err[X], Y=6/8, err[Y], Z=4/8, rho[X,Y], rho[X,Z], rho[Y,Z]

  5. X=8/6, err[X], Y=7/6, err[Y], Z=4/6, rho[X,Y], rho[X,Z], rho[Y,Z]

  6. 7/5, err[7/5], 6/8, err[6/8], 4/8, err[4/8], 7/6, err[7/6], 4/7, err[4/7], 4/6, err[4/6]

where optional columns are marked in round brackets

if method='Pb-Pb', then format is one of either:

  1. 6/4, err[6/4], 7/4, err[7/4], rho

  2. 4/6, err[4/6], 7/6, err[7/6], rho

  3. 6/4, err[6/4], 7/4, err[7/4], 7/6, err[7/6]

if method='Ar-Ar', then format is one of either:

  1. 9/6, err[9/6], 0/6, err[0/6], rho (, 39)

  2. 6/0, err[6/0], 9/0, err[9/0] (, rho) (, 39)

  3. 9/0, err[9/0], 6/0, err[6/0], 9/6, err[9/6] (, 39)

if method='K-Ca', then format is one of either:

  1. K40/Ca44, err[K40/Ca44], Ca40/Ca44, err[Ca40/Ca44], rho

  2. K40/Ca44, err[K40/Ca44], Ca40/Ca44, err[Ca40/Ca44], K40/Ca40, err[K40/Ca40]

if method='Rb-Sr', then format is one of either:

  1. Rb87/Sr86, err[Rb87/Sr86], Sr87/Sr86, err[Sr87/Sr86] (, rho)

  2. Rb, err[Rb], Sr, err[Sr], Sr87/Sr86, err[Sr87/Sr86]

where Rb and Sr are in ppm

if method='Sm-Nd', then format is one of either:

  1. Sm147/Nd144, err[Sm147/Nd144], Nd143/Nd144, err[Nd143/Nd144] (, rho)

  2. Sm, err[Sm], Nd, err[Nd], Nd143/Nd144, err[Nd143/Nd144]

where Sm and Nd are in ppm

if method='Re-Os', then format is one of either:

  1. Re187/Os188, err[Re187/Os188], Os187/Os188, err[Os187/Os188] (, rho)

  2. Re, err[Re], Os, err[Os], Os187/Os188, err[Os187/Os188]

where Re and Os are in ppm

if method='Lu-Hf', then format is one of either:

  1. Lu176/Hf177, err[Lu176/Hf177], Hf176/Hf177, err[Hf176/Hf177] (, rho)

  2. Lu, err[Lu], Hf, err[Hf], Hf176/Hf177, err[Hf176/Hf177]

where Lu and Hf are in ppm

if method='Th-U', then format is one of either:

  1. X=8/2, err[X], Y=4/2, err[Y], Z=0/2, err[Z], rho[X,Y], rho[X,Z], rho[Y,Z]

  2. X=2/8, err[X], Y=4/8, err[Y], Z=0/8, err[Z], rho[X,Y], rho[X,Z], rho[Y,Z]

  3. X=8/2, err[X], Y=0/2, err[Y], rho[X,Y]

  4. X=2/8, err[X], Y=0/8, err[Y], rho[X,Y]

where all values are activity ratios

if method='fissiontracks', then format is one of either:

  1. the External Detector Method (EDM), which requires a ζ-calibration constant and its uncertainty, the induced track density in a dosimeter glass, and a table with the spontaneous and induced track densities.

  2. LA-ICP-MS-based fission track data using the ζ-calibration method, which requires a 'session ζ' and its uncertainty and a table with the number of spontaneous tracks, the area over which these were counted and one or more U/Ca- or U-concentration measurements and their analytical uncertainties.

  3. LA-ICP-MS-based fission track data using the 'absolute dating' method, which only requires a table with the the number of spontaneous tracks, the area over which these were counted and one or more U/Ca-ratios or U-concentration measurements (in ppm) and their analytical uncertainties.

if method='other', x is read as a table, unless format is one of either:

radial or 'average':

X, err[X]

regression:

X, err[X], Y, err[Y], rho
OR X/Z, err[X/Z], Y/Z, err[Y/Z], X/Y, err[X/Y]

spectrum:

f, X, err[X]

ierr

indicates whether the analytical uncertainties are reported as:

  1. 1σ absolute uncertainties.

  2. 2σ absolute uncertainties.

  3. 1σ relative uncertainties (%).

  4. 2σ relative uncertainties (%).

Details

IsoplotR provides the following example input files:

The contents of these files can be viewed using the system.file(...) function. For example, to read the ArAr1.csv file:

fname <- system.file('ArAr1.csv',package='IsoplotR')

ArAr <- read.data(fname,method='Ar-Ar',format=1)

Value

an object of class UPb, PbPb, ArAr, KCa, UThHe, ReOs, SmNd, RbSr, LuHf, detritals, fissiontracks, ThU or other

See Also

examples, settings

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
f1 <- system.file("UPb1.csv",package="IsoplotR")
file.show(f1) # inspect the contents of 'UPb1.csv'
d1 <- read.data(f1,method="U-Pb",format=1)
concordia(d1)

f2 <- system.file("ArAr1.csv",package="IsoplotR")
d2 <- read.data(f2,method="Ar-Ar",format=1)
agespectrum(d2)

f3 <- system.file("ReOs1.csv",package="IsoplotR")
d3 <- read.data(f3,method="Re-Os",format=1)
isochron(d2)

f4 <- system.file("FT1.csv",package="IsoplotR")
d4 <- read.data(f4,method="fissiontracks",format=1)
radialplot(d4)

f5 <- system.file("UThSmHe.csv",package="IsoplotR")
d5 <- read.data(f5,method="U-Th-He")
helioplot(d5)

f6 <- system.file("ThU2.csv",package="IsoplotR")
d6 <- read.data(f6,method="Th-U",format=2)
evolution(d6)

#  one detrital zircon U-Pb file (detritals.csv)
f7 <- system.file("DZ.csv",package="IsoplotR")
d7 <- read.data(f7,method="detritals")
kde(d7)

#  four 'other' files (LudwigMixture.csv, LudwigSpectrum.csv,
#  LudwigMean.csv, LudwigKDE.csv)
f8 <- system.file("LudwigMixture.csv",package="IsoplotR")
d8 <- read.data(f8,method="other")
radialplot(d8)

IsoplotR documentation built on Dec. 9, 2018, 1:04 a.m.