Re: [R] Removing colon from numerical data

2010-03-04 Thread Henrique Dallazuanna
Try this: D <- as.numeric(gsub("[[:punct:]]", "", D)) On Thu, Mar 4, 2010 at 2:12 PM, LCOG1 wrote: > > Basic question, looked through the forum and documentation but didnt see a > solution. > > So consider > > O<-c(1:20) > D<-c("1:","2:","3:","4:","5:","6:","7:","8:","9:","10:","11:","12:","13:"

Re: [R] Removing colon from numerical data

2010-03-04 Thread David Winsemius
On Mar 4, 2010, at 12:12 PM, LCOG1 wrote: Basic question, looked through the forum and documentation but didnt see a solution. So consider O<-c(1:20) D<- c ("1 :","2 :","3 :","4 :","5:","6:","7:","8:","9:","10:","11:","12:","13:","14:","15:","16:", "17:","18:","19:","20:") Time<-c(