Re: [R] Changing character into date

2012-08-12 Thread Berry Boessenkool
Another helfpul function is strptime Berry -- View this message in context: http://r.789695.n4.nabble.com/Changing-character-into-date-tp4640079p4640088.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing l

Re: [R] Changing character into date

2012-08-12 Thread Rui Barradas
Hello, There are two or three simple ways. x <- c("2012-08-09 22:23:00", "2012-08-09 22:24:00") #1st: dates without times as.Date(x) [1] "2012-08-09" "2012-08-09" #2nd: dates and times and time zones. #Too big for axis tick marks? as.POSIXct(x) [1] "2012-08-09 22:23:00 BST" "2012-08-09 22:2

[R] Changing character into date solved

2012-08-11 Thread Erin Hodgess
Here it is: zz <- strptime(zip.df$Time,"%Y-%m-%d %H:%M:%S") > plot(zz,zip.df$TempC,type="l") > Woo Hoo! Thanks though! Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmail.com __

[R] Changing character into date

2012-08-11 Thread Erin Hodgess
Dear R People: I have a column in a data frame that has date and time (one per minute), such as "2012-08-09 22:23:00 2012-08-09 22:24:00" etc. What is the best way to change that into numeric dates to be used as an x-axis, please? I've been looking at as.Date and as.Date.numeric, but those are f