is.allzero {dae} | R Documentation |
A single-line function
that tests whether all elements are zero
(approximately).
is.allzero(x)
x |
An |
The mean of the absolute values of the elements of x
is tested to determine if it is less than daeTolerance
, which is initially set to .Machine$double.eps ^ 0.5
(about 1.5E-08). The function set.daeTolerance
can be used to change daeTolerance
.
A logical
.
Chris Brien
## create a vector of 9 zeroes and a one
y <- c(rep(0,9), 1)
## check that vector is only zeroes is FALSE
is.allzero(y)