The goal of dalcwrs is to ...
You can install dalcwrs from github with:
# install.packages("devtools")
devtools::install_github("paleolimbot/dalcwrs")
Load the package:
library(tidyverse)
#> Loading tidyverse: ggplot2
#> Loading tidyverse: tibble
#> Loading tidyverse: tidyr
#> Loading tidyverse: readr
#> Loading tidyverse: purrr
#> Loading tidyverse: dplyr
#> Conflicts with tidy packages ----------------------------------------------
#> filter(): dplyr, stats
#> lag(): dplyr, stats
library(dalcwrs)
Reading ICP files...
df <- read_icpms(system.file("test_icpms/test_icpms.xlsx", package = "dalcwrs"))
str(df)
#> Classes 'tbl_df', 'tbl' and 'data.frame': 132 obs. of 14 variables:
#> $ source : chr "/home/dewey/R/x86_64-pc-linux-gnu-library/3.4/dalcwrs/test_icpms/test_icpms.xlsx" "/home/dewey/R/x86_64-pc-linux-gnu-library/3.4/dalcwrs/test_icpms/test_icpms.xlsx" "/home/dewey/R/x86_64-pc-linux-gnu-library/3.4/dalcwrs/test_icpms/test_icpms.xlsx" "/home/dewey/R/x86_64-pc-linux-gnu-library/3.4/dalcwrs/test_icpms/test_icpms.xlsx" ...
#> $ sample_id : chr "Blank 1" "Blank 1" "Blank 1" "Blank 1" ...
#> $ datetime : POSIXct, format: "2015-07-17 14:23:56" "2015-07-17 14:23:56" ...
#> $ extra : chr NA NA NA NA ...
#> $ run : chr "1" "2" "3" "x" ...
#> $ 4.5Bkg_ppb : num 0 0 0 0 0 0 0 0 0 0 ...
#> $ 27Al_ppb : num 0.078 -0.035 -0.043 0 0.068 ...
#> $ 45Sc_ppb : num 0.975 1.009 1.016 1 0.022 ...
#> $ 56Fe_ppb : num 2.702 -0.864 -1.838 0 2.39 ...
#> $ 65Cu_ppb : num 0.028 -0.015 -0.014 0 0.025 ...
#> $ 115In_ppb : num 0.9762 1.0068 1.017 1 0.0212 ...
#> $ 159Tb_ppb : num 0.9724 1.0088 1.0188 1 0.0244 ...
#> $ 208Pb_ppb : num 0.014 -0.007 -0.008 0 0.012 ...
#> $ 220.5Bkg_ppb: num 0 0 0 0 0 0 0 0 0 0 ...
Get tidy versions of ICP files in parameter-long form:
tidy <- tidy_icpms(df)
str(tidy)
#> Classes 'tbl_df', 'tbl' and 'data.frame': 198 obs. of 12 variables:
#> $ source : chr "/home/dewey/R/x86_64-pc-linux-gnu-library/3.4/dalcwrs/test_icpms/test_icpms.xlsx" "/home/dewey/R/x86_64-pc-linux-gnu-library/3.4/dalcwrs/test_icpms/test_icpms.xlsx" "/home/dewey/R/x86_64-pc-linux-gnu-library/3.4/dalcwrs/test_icpms/test_icpms.xlsx" "/home/dewey/R/x86_64-pc-linux-gnu-library/3.4/dalcwrs/test_icpms/test_icpms.xlsx" ...
#> $ sample_id: chr "Blank 1" "Blank 1" "Blank 1" "Blank 1" ...
#> $ datetime : POSIXct, format: "2015-07-17 14:23:56" "2015-07-17 14:23:56" ...
#> $ extra : chr NA NA NA NA ...
#> $ isotope : num 115 159 208 220 27 ...
#> $ element : chr "In" "Tb" "Pb" "Bkg" ...
#> $ value : num 1 1 -0.000333 0 0 ...
#> $ sd : num 0.0212 0.0244 0.0124 0 0.0677 ...
#> $ unit : chr "ppb" "ppb" "ppb" "ppb" ...
#> $ n : int 3 3 3 3 3 3 3 3 3 3 ...
#> $ n_na : int 0 0 0 0 0 0 0 0 0 0 ...
#> $ rsd : num 2.12 2.44 -3726.93 NaN Inf ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.