| delta {powdR} | R Documentation | 
Calculate the Delta value for a fitted pattern
Description
delta computes the absolute difference between a measured and fitted pattern.
See equation for Delta in section 2.1 of Butler and Hillier (2021).
Usage
delta(measured, fitted, weighting)
Arguments
| measured | a vector of count intensities for a measured pattern | 
| fitted | a vector of count intensities for a fitted pattern | 
| weighting | an optional weighting vector of the same length as those specified
in  | 
Value
a single numeric value
References
Butler, B.M., Hillier, S., 2021. powdR: An R package for quantitative mineralogy using full pattern summation of X-ray powder diffraction data. Computers and Geosciences. 147, 104662. doi:10.1016/j.cageo.2020.104662
Examples
# Load soils xrd data
data(soils)
#Load minerals library
data(minerals)
## Not run: 
#Produce a fit
fps_sand <-  fps(lib = minerals,
                 smpl = soils$sandstone,
                 refs = minerals$phases$phase_id,
                 std = "QUA.1",
                 align = 0.2)
delta(measured = fps_sand$measured,
      fitted = fps_sand$fitted)
## End(Not run)