Try this (and see R News 4/1): > library(chron) > tt <- times(paste("5:20", "00", sep = ":")); tt [1] 05:20:00 > tt + 12/24 # add 12 hours [1] 17:20:00
On Wed, Feb 3, 2010 at 8:27 AM, karine heerah <karine.hee...@hotmail.fr> wrote: > > hi, > > > > I have my data time expressed in character string exple "5:20" (hour:min) and > i want to convert these in times recognized by R. I have tried the POSIXct > function: > > > > balise07$Hour <- as.POSXIct(balise07$Hour) > > > > but it didn't work. > > Do you know why? Do you know how i can convert my string character in a real > time? > > > > Thanks > > Karine HEERAH > > Master 2 mention "océanographie et environnements marins", parcours océanique > > 42 rue Salvador Allende > 92000 Nanterre > 06.61.50.97.47 > > > > > _________________________________________________________________ > > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.