[Rd] Bug in make.unique
Niek Bouman
niekboum@n @ending from hotm@il@com
Fri Oct 5 09:53:31 CEST 2018
The make.unique function states that the algorithm has the property that make.unique(c(A, B)) == make.unique(c(make.unique(A), B)).
This doesn't seem to be the case in all situations. An example:
A <- c("1","1")
B <- "1.1"
make.unique(c(A, B))
[1] "1" "1.2" "1.1"
make.unique(c(make.unique(A), B))
[1] "1" "1.1" "1.1.1"
make.unique(c(A, B)) == make.unique(c(make.unique(A), B))
[1] TRUE FALSE FALSE
I tested this on a couple of R versions between R 3.2.1 and R 3.5.0.
[[alternative HTML version deleted]]
More information about the R-devel
mailing list