powdR is an implementation of the full pattern summation approach to
quantitative mineralogy from X-ray powder diffraction data (Chipera and
Bish 2002, 2013; Eberl 2003).
powdR has several advantages over the excel based implementations of
full pattern summation such as FULLPAT (Chipera and Bish 2002) and
RockJock (Eberl 2003). First, computation is faster and, when
quantifying multiple samples, can be used in combination with other
parallel processing. Secondly, powdR can be run via a Shiny web
application, which offers a user friendly interface for fast and
iterative mineral quantification. Lastly, R represents a powerful tool
for data manipulation, allowing users to creatively adapt, pre-treat and
visualise their data.
The stable version of
powdR is on CRAN:
Alternatively, the development version can be downloaded from GitHub
#Install devtools if you don't already have it on your machine install.packages("devtools") devtools::install_github('benmbutler/powdR')
library(powdR) #> powdR: Full Pattern Summation of X-Ray Powder Diffraction Data #Load some soils to quantify data(soils) #Load a powdRlib reference library of pure patterns data(minerals) #Quantify a sample q <- fps(lib = minerals, smpl = soils$sandstone, refs = minerals$phases$phase_id, std = "QUA.1") #> #> -Aligning sample to the internal standard #> -Interpolating library to same 2theta scale as aligned sample #> -Optimising... #> -Removing negative coefficients and reoptimising... #> -Computing phase concentrations #> -Internal standard concentration unknown. Assuming phases sum to 100 % #> ***Full pattern summation complete*** #Inspect the phase concentrations (summarised by name) q$phases_grouped #> phase_name phase_percent #> 1 Illite 1.3290 #> 2 K-feldspar 1.3020 #> 3 Kaolinite 1.3697 #> 4 Organic-Matter 41.1591 #> 5 Plagioclase 1.1632 #> 6 Quartz 53.6769 #Inspect the quantification plot(q, wavelength = "Cu")
plot(q, wavelength = "Cu", interactive = TRUE) provides
an interactive plot for better inspection of the fit. More detailed
usage instructions are provided in the package vignette.
powdR via the Shiny app, use
run_powdR(). This loads the
application in your default web browser. The application has six tabs:
powdRlibreference library from two .csv files: one for the XRPD measurements, and the other for the ID, name and reference intensity ratio of each pattern.
powdRlibreference library .
powdRafpsobjects to be viewed and edited via addition or removal of reference patterns.
Please note that the
powdR Shiny app may not work in the Microsoft
Edge internet browser.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.