read.data: Read geochronological data

View source: R/io.R

read.dataR Documentation

Read geochronological data

Description

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

Usage

read.data(x, ...)

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

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

## S3 method for class 'matrix'
read.data(
  x,
  method = "U-Pb",
  format = 1,
  ierr = 1,
  d = diseq(),
  Th02i = c(0, 0),
  Th02U48 = c(0, 0, 1e+06, 0, 0, 0, 0, 0, 0),
  U8Th2 = 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-Pb', '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. X=07/35, err[X], Y=06/38, err[Y], rho[X,Y]

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

  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=07/35, err[W], X=06/38, err[X], Y=08/32, err[Y], Z=32/38, err[Z], (rho[W,X], rho[W,Y], rho[W,Z], rho[X,Y], rho[X,Z], rho[Y,Z])

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

  9. X=38/06, err[X], Y=04/06, err[Y], (rho[X,Y])

  10. X=35/07, err[X], Y=04/07, err[Y], (rho[X,Y])

  11. X=38/06, err[X], Y=08/06, err[Y], (Z=32/38, err[Z], rho[X,Y], rho[X,Z], rho[Y,Z])

  12. X=35/07, err[X], Y=08/07, err[Y], (Z=32/38, err[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 \zeta-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 \zeta-calibration method, which requires a 'session \zeta' 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', then format is one of either:

1:

X

2:

X, err[X]

3:

f, X, err[X]

4:

X, err[X], Y, err[Y], rho

5:

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

6:

a n x (n+1) matrix obtained by prepending a vector of alternating X,Y-values to its covariance matrix

ierr

indicates whether the analytical uncertainties of the input are provided as:

1: 1\sigma absolute uncertainties.

2: 2\sigma absolute uncertainties.

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

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

d

an object of class diseq.

Th02i

2-element vector with the assumed initial ^{230}Th/^{232}Th-ratio of the detritus (for Th-U formats 1 and 2) and its standard error.

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.

U8Th2

^{238}U/^{232}Th activity-ratio of the whole rock. Used to estimate the initial ^{230}Th/^{238}U disequilibrium (for Th-U formats 3 and 4).

Details

IsoplotR provides the following example input files:

  • U-Pb: UPb1.csv, UPb2.csv, UPb3.csv, UPb4.csv, UPb5.csv, UPb6.csv, UPb7.csv, UPb8.csv

  • Pb-Pb: PbPb1.csv, PbPb2.csv, PbPb3.csv

  • Th-Pb: ThPb1.csv, ThPb2.csv, ThPb3.csv

  • Ar-Ar: ArAr1.csv, ArAr2.csv, ArAr3.csv

  • K-Ca: KCa1.csv, KCa2.csv, KCa3.csv

  • Re-Os: ReOs1.csv, ReOs2.csv, ReOs3.csv

  • Sm-Nd: SmNd1.csv, SmNd2.csv, SmNd3.csv

  • Rb-Sr: RbSr1.csv, RbSr2.csv, RbSr3.csv

  • Lu-Hf: LuHf1.csv, LuHf2.csv, LuHf3.csv

  • Th-U: ThU1.csv, ThU2.csv, ThU3.csv ThU4.csv

  • fissiontracks: FT1.csv, FT2.csv, FT3.csv

  • U-Th-He: UThHe.csv, UThSmHe.csv

  • detritals: DZ.csv

  • other: LudwigMixture.csv, LudwigMean.csv, LudwigKDE.csv, LudwigSpectrum.csv

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, ThPb, KCa, RbSr, SmNd, LuHf, ReOs, UThHe, fissiontracks, detritals or PD. See classes for further details.

See Also

examples, settings

Examples


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",format=2)
radialplot(d8)


pvermees/IsoplotR documentation built on Nov. 18, 2024, 1:02 a.m.