[Rd] integerOneIndex/get1index/... in vector access error messages

Lukas Stadler lukas.stadler at oracle.com
Wed Oct 12 10:37:18 CEST 2016


Hi!

We noticed that these error messages were changed to include the name of the function that causes them:
> { x<-c(1,2); x[[c("a", "b")]] }
old: “Error in x[[c("a", "b")]] : attempt to select more than one element”
new: “Error in x[[c("a", "b")]] : attempt to select more than one element in vectorIndex”

This is the relevant change:
https://github.com/wch/r-source/commit/5d6c765bf8b97bf872f760d06622850f43696d8b

I don’t think that a user of R is supposed to know the difference between, e.g., integerOneIndex and get1index, so this will confuse, rather than help, a user while diagnosing problems.
To be honest, this looks to me like leftover debug code...

In FastR, we try to adhere as closely as possible to GNUR in which errors are returned when.
Do you think that providing these “in Xyz” suffixes is important?

- Lukas


More information about the R-devel mailing list