Learn R Programming

IsoplotR (version 0.17)

read.data: Read geochronology data

Description

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

Usage

read.data(x, ...)

# S3 method for default read.data(x, method = "U-Pb", format = 1, ...)

# S3 method for matrix read.data(x, method = "U-Pb", format = 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, s[7/5], 6/8, s[6/8], rho

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

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

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

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

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

where optional columns are marked in round brackets

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

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

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

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

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

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

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

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

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

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

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

where Rb and Sr are in ppm

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

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

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

where Sm and Nd are in ppm

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

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

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

where Re and Os are in ppm

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

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

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

where Lu and Hf are in ppm

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

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

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

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- or U-concentration measurements and their analytical uncertainties.

Value

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

Details

IsoplotR provides the following example input files:

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

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

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

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

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

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

  • Lu-Hf: LuHf1.csv, LuHf2.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: Namib.csv

  • other: MountTom.csv, average.csv, spectrum.csv

The contents of these files can be viewed using the system.file(...) function.

Examples

Run this code
# NOT RUN {
file.show(system.file("spectrum.csv",package="IsoplotR"))

f1 <- system.file("UPb1.csv",package="IsoplotR")
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("Namib.csv",package="IsoplotR")
d7 <- read.data(f7,method="detritals")
kde(d7)

#  three 'other' files (MountTom.csv, spectrum.csv, average.csv)
f8 <- system.file("MountTom.csv",package="IsoplotR")
d8 <- read.data(f8,method="other")
radialplot(d8)

# }

Run the code above in your browser using DataLab