Skip to contents

cov_R create a wide format tibble for an isotope pair

Usage

cov_R(.IC, .ion, ..., .species = NULL, .t = NULL, .preserve = FALSE)

Arguments

.IC

A tibble containing processed ion count data.

.ion

A character string or vector constituting ion names.

...

Variables for grouping.

.species

A variable constituting the species analysed.

.t

A variable constituting the time of the analyses.

.preserve

A logical whether to preserve ID variable.

Value

A tibble::tibble in wide format

Details

This functions converts the long format data frame to a wide format tibble for an isotope pair based on an unique identifier for the time of measurement. The data can be linked by a combination of three variable unique for the analyses; the file name, the chemical species name and the time increment of measurement. Pay attention when using in combination with `zeroCt()`.

Examples


# raw data containing 13C and 12C counts on carbonate
tb_rw <- read_IC(point_example("2018-01-19-GLENDON"))

# Processing raw ion count data
tb_pr <- cor_IC(tb_rw)

# wide format
cov_R(tb_pr, c("13C", "12C"), file.nm)
#> # A tibble: 11,700 × 6
#>    file.nm                 t.nm Xt.pr.12C Xt.pr.13C N.pr.12C N.pr.13C
#>    <chr>                  <dbl>     <dbl>     <dbl>    <dbl>    <dbl>
#>  1 2018-01-19-GLENDON_1_1  0.54    34460.      358.    12040      125
#>  2 2018-01-19-GLENDON_1_1  1.08    34202.      341.    11950      119
#>  3 2018-01-19-GLENDON_1_1  1.62    34632.      395.    12100      138
#>  4 2018-01-19-GLENDON_1_1  2.16    34191.      366.    11946      128
#>  5 2018-01-19-GLENDON_1_1  2.7     34855.      378.    12178      132
#>  6 2018-01-19-GLENDON_1_1  3.24    34672.      369.    12114      129
#>  7 2018-01-19-GLENDON_1_1  3.78    34766.      369.    12147      129
#>  8 2018-01-19-GLENDON_1_1  4.32    34609.      366.    12092      128
#>  9 2018-01-19-GLENDON_1_1  4.86    34414.      406.    12024      142
#> 10 2018-01-19-GLENDON_1_1  5.4     34474.      409.    12045      143
#> # … with 11,690 more rows