Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ratioToPpm

Convert ratio to ppm


Description

ratioToPpm transforms ratio 'x' to ppm (parts per million). If 'y' not given (or different length as 'x'), then 'x' is assumed as ratio otherise rations are constructed as x/y is used lateron. Does additional checking : negative values not expected - will be made absolute !

Usage

ratioToPpm(x, y = NULL, nSign = NULL, silent = FALSE, callFrom = NULL)

Arguments

x

(numeric) main input

y

(numeric) optional value to construct ratios (x/y). If NULL (or different length as 'x'), then 'x' will be considered as ratio.

nSign

(numeric) number of significan digits

silent

(logical) suppres messages

callFrom

(character) allow easier tracking of message(s) produced

Value

numeric vector of ppm values

See Also

XYToDiffPpm for ppm of difference as used in mass spectrometrie

Examples

set.seed(2017); aa <- c(1.000001,0.999999,1+rnorm(10,0,0.001))
cbind(x=aa,ppm=ratioToPpm(aa,nSign=4))

wrMisc

Analyze Experimental High-Throughput (Omics) Data

v1.5.4
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.