[Rd] confusing all.equal output

Antoine Fabri @nto|ne@|@br| @end|ng |rom gm@||@com
Wed Mar 1 13:53:21 CET 2023


dear r-devel,

This has probably been forever like this but is this satisfying ?

all.equal(c(1,NA,NA), c(1,NA,3))
#> [1] "'is.NA' value mismatch: 1 in current 2 in target"

is.NA() doesn't exist (is.na() does), and is.na() is never 1 or 2.

In this example it's obvious that we're counting missing values, in a
general situation I believe it isn't (we might understand it as the
position of the first NA for instance).

I would expect something like "'amount of missing values mismatch: 1 in
current 2 in target"

Thanks,

Antoine

	[[alternative HTML version deleted]]



More information about the R-devel mailing list