[Rd] names<- in data.frame (PR#13916)
vitosmail at rambler.ru
vitosmail at rambler.ru
Fri Aug 28 18:30:14 CEST 2009
Full_Name: Spinu Vitalie
Version: 2.9.0
OS: Windows
Submission from: (NULL) (130.115.113.15)
In assignment of "zero length" names to data.frame:
> tdf <- data.frame(rbind(c(1, 2), c(1, 2)))
> names(tdf) <- c("", "")
> tdf
structure(c("1", "1"), class = "AsIs") structure(c("2", "2"), class = "AsIs")
1 1 2
2 1 2
For vectors it works nicely:
> tv <- c(1, 2)
> names(tv) <- c("", "")
> tv
1 2
> sessionInfo()
R version 2.9.0 (2009-04-17)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics uti
More information about the R-devel
mailing list