knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
# packages library(ggplot2) library(dplyr) library(tidyr) library(magrittr)
This vignette shows how to
Import raw data files (csv files) as exported from the X-ray fluorescence device in the lab (ZSX Primus II, Rigaku).
Reformat the data to get a tidy data.frame
.
Check the data via plots.
Export the data and metadata as csv files in the tidy format.
Data import and reformatting are done with function elco:elco_xrf_import_csv
:
# get names of files to import files <- list.files("./../inst/extdata/xrf/", full.names = TRUE) # data import d <- elco::elco_xrf_import_csv(files = files)
To check the data, a plot is created for each measured variable and sample and points for which the calibration range was exceeded are colored.
# plot for checking plot(d)
To export the data, use elco::elco_xrf_export_csv
.
d <- elco::elco_xrf_export_csv(d, file = "./xrf_export.csv")
This Rmarkdown template is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
Title: Reformatting and checking raw data (csv files) from the X-ray fluorescence device (ZSX Primus II, Rigaku)
Author: Henning Teickner
Date: 2020-08-05
Data: The data are licensed under the CC-BY-SA-4.0 license. All data for elco were provided by @Gaka.2019.
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.