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
14
15
16
read.data(x, ...)

## Default S3 method:
read.data(x, method = "U-Pb", format = 1, ierr = 1,
  d = diseq(), Th02 = c(0, 0), Th02U48 = c(0, 0, 1e+06, 0, 0, 0, 0,
  0, 0), ...)

## S3 method for class 'data.frame'
read.data(x, method = "U-Pb", format = 1,
  ierr = 1, d = diseq(), Th02 = c(0, 0), Th02U48 = c(0, 0, 1e+06,
  0, 0, 0, 0, 0, 0), ...)

## S3 method for class 'matrix'
read.data(x, method = "U-Pb", format = 1, ierr = 1,
  d = diseq(), Th02 = c(0, 0), Th02U48 = c(0, 0, 1e+06, 0, 0, 0, 0,
  0, 0), ...)

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', 'Th-Pv', 'Ar-Ar', 'K-Ca', '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. 07/35, err[07/35], 06/38, err[06/38], rho

  2. 38/06, err[38/06],07/06, err[07/06] (, rho)

  3. X=07/35, err[X], Y=06/38, err[Y], Z=07/06, err[Z] (, rho[X,Y]) (, rho[Y,Z])

  4. X=07/35, err[X], Y=06/38, err[Y], Z=04/38, rho[X,Y], rho[X,Z], rho[Y,Z]

  5. X=38/06, err[X], Y=07/06, err[Y], Z=04/06, err[Z] (, rho[X,Y], rho[X,Z], rho[Y,Z])

  6. 07/35, err[07/35], 06/38, err[06/38], 04/38, err[04/38], 07/06, err[07/06], 04/07, err[04/07], 04/06, err[04/06]

  7. W=38/06, err[W], X=07/06, err[X], Y=08/06, err[Y], and Z=32/38, (err[Z], rho[W,X], rho[W,Y], rho[W,Z], rho[X,Y], rho[X,Z], rho[Y,Z])

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], 6/7, err[6/7]

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

  1. 32/04, err[32/04], 08/04, err[08/04], rho

  2. 32/08, err[32/08], 04/08, err[08/04], rho

  3. 32/04, err[32/04], 08/04, err[08/04], 32/08, err[32/08]

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/Ca40, err[K40/Ca40], Ca44/Ca40, err[Ca44/Ca40], rho

  3. 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. Rb87/Sr87, err[Rb87/Sr87], Sr86/Sr87, err[Sr86/Sr87] (, rho)

  3. 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. Sm147/Nd143, err[Sm147/Nd143], Nd144/Nd143, err[Nd144/Nd143] (, rho)

  3. 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. Re187/Os187, err[Re187/Os187], Os188/Os187, err[Os188/Os187] (, rho)

  3. 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. Lu176/Hf176, err[Lu176/Hf176], Hf177/Hf176, err[Hf177/Hf176] (, rho)

  3. 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 (%).

d

an object of class diseq.

Th02

2-element vector with the assumed initial ^{230}Th/^{232}Th-ratio of the detritus and its standard error. Only used if isochron=FALSE and detritus=2

Th02U48

9-element vector with the measured composition of the detritus, containing X=0/8, sX, Y=2/8, sY, Z=4/8, sZ, rXY, rXZ, rYZ.

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

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)

pvermees/IsoplotR documentation built on April 4, 2020, 11:54 p.m.