Re: [R] Convert Row Names to data.frame column

2010-07-23 Thread David Winsemius
On Jul 23, 2010, at 6:18 PM, chipmaney wrote: Here is an example dataset: ZoneCover.df<- data.frame(Value=c(1,2)) row.names(ZoneCover.df) <- c("Floodplain1.Tree", "Floodplain1.Shrub") I want to Export the Row.Names to a column in the dataframe: ZoneCover.df$ID <- names(ZoneCover.df) which

[R] Convert Row Names to data.frame column

2010-07-23 Thread chipmaney
Here is an example dataset: ZoneCover.df<- data.frame(Value=c(1,2)) row.names(ZoneCover.df) <- c("Floodplain1.Tree", "Floodplain1.Shrub") I want to Export the Row.Names to a column in the dataframe: ZoneCover.df$ID <- names(ZoneCover.df) which yields this: > ZoneCover.df V