| maxi | R Documentation |
maxi determines the maximum or mass spectrometry intensity values, e.g.
from a spectrum or chromatogram. In contrast to the base R max() function
this function returns NA_real_ if all intensity values are NA or if
length(x) is 0 (the base R max function returns -Inf in these cases).
maxi(x)
x |
|
numeric(1) representing the maximum of values in x. Returns
always a numeric (double) even if x is an integer.
Johannes Rainer, Sebastian Gibb
sumi()
x <- c(3.2, 34.4, 1.3, NA)
maxi(x)
## Compared to base R max:
max(x)
max(x, na.rm = TRUE)
max(numeric(), na.rm = TRUE)
maxi(numeric())
max(c(NA, NA), na.rm = TRUE)
maxi(c(NA, NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.