README.md

georefdatar – Geosciences Reference Datasets in R

R-CMD-check CRAN status development version number License: MIT Test coverage

The goal of georefdatar is to provide regularly used reference data sets for geoscience for use with R.

Up to now these are:

All datasets are fully referenced, and a BibTeX file containing the references is included.

Installation

You can install the version from CRAN with:

install.packages("georefdatar")

Or you can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("abuseki/georefdatar")

Example

``` r library(georefdatar)

PMSun_McDounough1989[,c('Cs','Rb','Ba','Th','U','Nb','K','La','Ce','Pb','Pr','Sr','P','Nd','Zr','Sm','Eu','Ti','Dy','Y','Yb','Lu')] ```

  ##       Cs    Rb    Ba    Th     U    Nb   K    La    Ce    Pb    Pr   Sr  P
  ## 1 0.0079 0.635 6.989 0.085 0.021 0.713 250 0.687 1.775 0.071 0.276 21.1 95
  ##      Nd   Zr    Sm    Eu   Ti    Dy    Y    Yb    Lu
  ## 1 1.354 11.2 0.444 0.168 1300 0.737 4.55 0.493 0.074

or using dplyr:

``` r library(georefdatar) library(dplyr)

PMSun_McDounough1989 %>% select(Cs, Rb, Ba, Th, U, Nb, K, La, Ce, Pb, Pr, Sr, P, Nd, Zr, Sm, Eu, Ti, Dy, Y, Yb, Lu) ```

  ## # A tibble: 1 × 22
  ##       Cs    Rb    Ba    Th     U    Nb     K    La    Ce    Pb    Pr    Sr     P
  ##    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
  ## 1 0.0079 0.635  6.99 0.085 0.021 0.713   250 0.687  1.78 0.071 0.276  21.1    95
  ## # ℹ 9 more variables: Nd <dbl>, Zr <dbl>, Sm <dbl>, Eu <dbl>, Ti <dbl>,
  ## #   Dy <dbl>, Y <dbl>, Yb <dbl>, Lu <dbl>

r aw('H')

  ## [1] 1.008

r aw('H')*2 + aw('O')

  ## [1] 18.015

r # Si wt% in muscovite round(3*aw('Si') / (aw('K')+3*aw('Al')+3*aw('Si')+12*aw('O')+2*aw('H')) * 100, 2)

  ## [1] 21.15


abuseki/georefdatar documentation built on Aug. 12, 2024, 11:33 p.m.