[R] Replace / with - in date

prem_R mtechprem at gmail.com
Fri Apr 16 01:20:55 CEST 2010

>  x <- c("2000/01/01",
>  xd <- as.data.frame(x)
>  levels(xd$x) <- gsub("/", "-", levels(xd$x)) 
>  fix(xd)

This works fine .but with one more variable say xsd in the data frame i'm
getting the following error

Error in levels(sa$date1) <- gsub("/", "-", levels(sa$date)) : 
  attempt to set an attribute on NULL

View this message in context: http://n4.nabble.com/Replace-with-in-date-tp1911391p1934428.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list