With version 1.7.0 the as_date function does not convert a character with a date and time to a date, instead it returns NA with a warning. The expected value to be returned was a date with the time portion dropped. In version 1.6.0, the function converted the character to a date.
# See if as_date works with current version of lubridate to convert a character string with time
install.packages("lubridate")
#> (as 'lib' is unspecified)
#> package 'lubridate' successfully unpacked and MD5 sums checked
#>
#> The downloaded binary packages are in
#> C:\Users\kerry.jackson\AppData\Local\Temp\RtmpEL6DC7\downloaded_packages
lubridate::as_date("2017-10-31 06:00:00")
#> Warning: All formats failed to parse. No formats found.
#> [1] NA
packageVersion("lubridate")
#> [1] '1.7.0'
# See if as_date works with version 1.6 of lubridate to convert a character string with time
library(devtools)
install_version("lubridate", version = "1.6.0", repos = "http://cran.us.r-project.org")
#>
lubridate::as_date("2017-10-31 06:00:00")
#> [1] "2017-10-31"
packageVersion("lubridate")
#> [1] '1.6.0'
With version 1.7.0 the as_date function does not convert a character with a date and time to a date, instead it returns NA with a warning. The expected value to be returned was a date with the time portion dropped. In version 1.6.0, the function converted the character to a date.