[R] A stopifnot() nastiness, even if not a bug
bgunter@4567 @end|ng |rom gm@||@com
Mon Apr 13 01:30:09 CEST 2020
Don't know if this has come up before, but ...
> x <- c(0,0)
Error: length(x) is not TRUE
Called from: top level
> stopifnot(length(x) > 0) ## not an error; nor is
Maybe the man page should say something about not assuming automatic
coercion to logical, which is the usual expectation. Or fix this.
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
More information about the R-help