mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-29 20:14:08 +00:00
Raise exception if date parsing fails
This commit is contained in:
parent
459e0fed6c
commit
68f88e2b73
1 changed files with 3 additions and 0 deletions
|
|
@ -218,6 +218,9 @@ setup_dataframe <- function(m, df, initialize_scales = FALSE) {
|
|||
df$y <- as.numeric(df$y)
|
||||
}
|
||||
df$ds <- zoo::as.Date(df$ds)
|
||||
if (anyNA(df$ds)) {
|
||||
stop('Unable to parse date format in column ds. Convert to date format.')
|
||||
}
|
||||
|
||||
df <- df %>%
|
||||
dplyr::arrange(ds)
|
||||
|
|
|
|||
Loading…
Reference in a new issue