Re: [R] Replace Function (How to replace numbers in a data frame with a specific number)

2009-01-07 Thread Henrique Dallazuanna
Try this: taxa[, 5:9][taxa[,5:9] > 0] <- 1 On Wed, Jan 7, 2009 at 1:36 PM, stephen sefick wrote: > taxa <- (structure(list(Date = structure(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, > 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c("2006/04", > "2006/05", "2006/07", "2006/10", "2006/12",

Re: [R] Replace Function (How to replace numbers in a data frame with a specific number)

2009-01-07 Thread stephen sefick
very good thanks On Wed, Jan 7, 2009 at 11:18 AM, Henrique Dallazuanna wrote: > Try this: > > taxa[, 5:9][taxa[,5:9] > 0] <- 1 > > > On Wed, Jan 7, 2009 at 1:36 PM, stephen sefick wrote: >> >> taxa <- (structure(list(Date = structure(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, >> 4L, 4L, 4L, 4L, 5L, 5L, 5L,

[R] Replace Function (How to replace numbers in a data frame with a specific number)

2009-01-07 Thread stephen sefick
taxa <- (structure(list(Date = structure(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c("2006/04", "2006/05", "2006/07", "2006/10", "2006/12", "2007/02", "2007/04", "2007/06", "2007/08", "2007/10", "2007/12", "2008/01"), class = "factor"), RiverMil