[Rd] 'rbind' in example(make.unique)

Suharto Anggono Suharto Anggono suharto_anggono at yahoo.com
Mon May 27 07:36:08 CEST 2013


> rbind(data.frame(x = 1), data.frame(x = 2), data.frame(x = 3))
  x
1 1
2 2
3 3
> rbind(rbind(data.frame(x = 1), data.frame(x = 2)), data.frame(x = 3))
  x
1 1
2 2
3 3

Above is the result of running the last two lines in "Examples" of 'make.unique'. I don't see the work of 'make.unique' there. It used to work, when there is no automatic row names for data frame.

Perhaps a simpler example is adding columns.

> data.frame(x = 1, x = 2, x = 3)
  x x.1 x.2
1 1   2   3
> data.frame(data.frame(x = 1, x = 2), x = 3)
  x x.1 x.2
1 1   2   3

> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] tools_3.0.1



More information about the R-devel mailing list