Re: [R] Adding row name to dataframe

2010-09-26 Thread Pedersen Jon
Tim, The row names have only one dimension, so for example row.names(xy)[11]<-"New rname" will work best, Jon -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tim Clark Sent: 27. september 2010 04:41 To: r-help@r-project.org Cc: tim

Re: [R] Adding row name to dataframe

2010-09-26 Thread Michael Bedward
Hello Tim, Either of these variations on your example should work... rownames(xy)[11] <- 12 rownames(xy)[11] <- "12" It's just like assigning values to any character vector, so you can also do things like... rownames(xy) <- a.vector.of.all.the.row.names rownames(xy)[1:10] <- paste("foo", 1:10,