Skip to content

Commit

Permalink
Fix coding for dates
Browse files Browse the repository at this point in the history
  • Loading branch information
rdpeng committed Sep 4, 2014
1 parent f73712c commit 7cf478a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 02_RProgramming/Dates/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ p$sec

## Times in R

Finally, there is the `strptime` function in case your dates are written in a different format
Finally, there is the `strptime` function in case your dates are
written in a different format

```r
datestring <- c("January 10, 2012 10:40", "December 9, 2011
datestring <- c("January 10, 2012 10:40", "December 9, 2011 9:10")
x <- strptime(datestring, "%B %d, %Y %H:%M")
x
## [1] "2012-01-10 10:40:00" "2011-12-09 09:10:00"
Expand Down

0 comments on commit 7cf478a

Please sign in to comment.