Skip to content

Commit

Permalink
mucking around with date recognition
Browse files Browse the repository at this point in the history
  • Loading branch information
florianm committed Apr 2, 2015
1 parent 4417427 commit a1188da
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions global.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ get_data <- function(url,
read.table(url, sep=',', header=T, stringsAsFactors=T),
function(x) {
if(is.factor(x)){
try(
if(is.Date(as.Date(x))){
x <- lubridate::parse_date_time(x, orders=ldo, tz=ltz)
}
)
# insert test whether factor x really is a date
x <- lubridate::parse_date_time(x, orders=ldo, tz=ltz)
x
}
x
}))
}

Expand Down

0 comments on commit a1188da

Please sign in to comment.