Re: [Rd] R-devel: rownames of a data.frame

2006-12-06 Thread Tony Plate
Martin Maechler wrote: > Gregor Gorjanc bfro.uni-lj.si> writes: > > >>Hello! >> >>Data.frames have new rownames funcionality, however in use of colnames<- >>in R-devel "changes" this. Here is the example: >> >> >>>df1 <- data.frame(letters[1:5]) >>>attributes(df1) >> >>$names >>[1] "letters.1.5.

Re: [Rd] R-devel: rownames of a data.frame

2006-12-06 Thread Gregor Gorjanc
Martin Maechler r-project.org> writes: ... > because colnames() and rownames() work via dimnames(), and so do > "colnames<-" and "rownames<-" --- > I think it would be unwise to change this, since it's well documented > property of these functions. > > As you noted yourself, using names()

Re: [Rd] R-devel: rownames of a data.frame

2006-12-05 Thread Martin Maechler
Gregor Gorjanc bfro.uni-lj.si> writes: > > Hello! > > Data.frames have new rownames funcionality, however in use of colnames<- > in R-devel "changes" this. Here is the example: > > > df1 <- data.frame(letters[1:5]) > > attributes(df1) > $names > [1] "letters.1.5." > > $row.names > [1] 1 2 3 4

[Rd] R-devel: rownames of a data.frame

2006-09-13 Thread Gregor Gorjanc
Hello! Data.frames have new rownames funcionality, however in use of colnames<- in R-devel "changes" this. Here is the example: > df1 <- data.frame(letters[1:5]) > attributes(df1) $names [1] "letters.1.5." $row.names [1] 1 2 3 4 5 $class [1] "data.frame" > colnames(df1) <- "bla" > attributes(d