math_functions | R Documentation |
na.rm
These functions call their original base R namesake, but with a global settable na.rm
argument.
any(..., na.rm = getOption("na.rm", FALSE))
all(..., na.rm = getOption("na.rm", FALSE))
mean(x, ..., na.rm = getOption("na.rm", FALSE))
sum(..., na.rm = getOption("na.rm", FALSE))
prod(..., na.rm = getOption("na.rm", FALSE))
min(..., na.rm = getOption("na.rm", FALSE))
max(..., na.rm = getOption("na.rm", FALSE))
pmin(..., na.rm = getOption("na.rm", FALSE))
pmax(..., na.rm = getOption("na.rm", FALSE))
range(..., na.rm = getOption("na.rm", FALSE))
sd(x, na.rm = getOption("na.rm", FALSE))
var(x, ..., na.rm = getOption("na.rm", FALSE))
median(x, na.rm = getOption("na.rm", FALSE), ...)
fivenum(x, na.rm = getOption("na.rm", FALSE))
quantile(
x,
...,
na.rm = getOption("na.rm", FALSE),
type = getOption("quantile.type", 7)
)
IQR(
x,
...,
na.rm = getOption("na.rm", FALSE),
type = getOption("quantile.type", 7)
)
... |
zero or more logical vectors. Other objects of zero length are ignored, and the rest are coerced to logical ignoring any class. |
na.rm |
logical. If true |
x |
an R object. Currently there are methods for
numeric/logical vectors and date,
date-time and time interval objects. Complex vectors
are allowed for |
type |
an integer between 1 and 9 selecting one of the nine quantile algorithms detailed below to be used. |
na.rm
This 'certestats' package supports a global default setting for na.rm
in many mathematical functions. This can be set with options(na.rm = TRUE)
or options(na.rm = FALSE)
.
For normality()
, quantile()
and IQR()
, this also applies to the type
argument. The default, type = 7
, is the default of base R. Use type = 6
to comply with SPSS.
base::any()
base::all()
base::mean()
base::sum()
base::prod()
base::min()
base::max()
base::pmin()
base::pmax()
base::range()
stats::sd()
stats::var()
stats::median()
stats::fivenum()
stats::quantile()
stats::IQR()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.