XYToDiffPpm | R Documentation |
This function transforms offset (pariwise-difference) between 'x' & 'y' to ppm (as normalized difference ppm, parts per million, ie (x-y)/y ). This type of expressiong differences is used eg in mass-spectrometry.
XYToDiffPpm(x, y, nSign = NULL, silent = FALSE, debug = FALSE, callFrom = NULL)
x |
(numeric) typically for measured variable |
y |
(numeric) typically for theoretical/expected value (vector must be of same length as 'x') |
nSign |
(integer) number of significant digits in output |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
This function returns a numeric vector of (ratio-) ppm values
ratioToPpm
for classical ppm
set.seed(2017); aa <- runif(10,50,900)
cbind(x=aa,y=aa+1e-3,ppm=XYToDiffPpm(aa,aa+1e-3,nSign=4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.