Closed kmcmahen closed 8 years ago
The dates and times chapter of R for Data Science should be really helpful for this.
Thanks, I was able to figure it out. For the reference of anyone else fighting with times that don't have a date attached, I recommend checking out the hms package.
I was making a data frame for homework 4, and included some times in it (see below). The default in R is to output the times in seconds. I unsuccessfully have tried some options for editing the time format to h:m using as.Date and as.POSIXct, but couldn't figure out how to do it for just time (with no dates).
Also, if I was able to find a way to convert it, where would I put that code when manually entering the data as below (or as data <- c1 = (8:00, 9:00, 7:00))?
Thanks!
grocerystores <- " store, opening_time, open_Sundays No Frills, 9:00, yes Save On, 7:00, yes Costco, 8:00, yes Whole Foods, 9:00, no Safeway, 8:00, yes "