From vitosmail at rambler.ru  Fri Aug 28 18:30:14 2009
From: vitosmail at rambler.ru (vitosmail at rambler.ru)
Date: Fri, 28 Aug 2009 18:30:14 +0200 (CEST)
Subject: [Rd] names<- in data.frame (PR#13916)
Message-ID: <20090828163014.C29302831FF2@mail.pubhealth.ku.dk>

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



[Rd] names<- in data.frame (PR#13916)
vitosmail at rambler.ru