From niekboum@n @ending from hotm@il@com  Fri Oct  5 09:53:31 2018
From: niekboum@n @ending from hotm@il@com (Niek Bouman)
Date: Fri, 5 Oct 2018 07:53:31 +0000
Subject: [Rd] Bug in make.unique
Message-ID: <HE1PR0101MB2153B4684113D54A1D2612DFDCEB0@HE1PR0101MB2153.eurprd01.prod.exchangelabs.com>

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]]



[Rd] Bug in make.unique
Niek Bouman