Skip to content

Commit

Permalink
specify origin when coercing numeric to date
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-brokamp committed Feb 4, 2024
1 parent 9b8c299 commit b5aef51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/merra.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ get_merra_data <- function(x, dates) {
d_merra <-
dates |>
unlist() |>
as.Date() |>
as.Date(origin = "1970-01-01") |>
unique() |>
format("%Y") |>
unique() |>
Expand Down
2 changes: 1 addition & 1 deletion R/narr.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ get_narr_data <- function(x, dates, narr_var = c("air.2m", "hpbl", "acpcp", "rhu
narr_raster <-
dates |>
unlist() |>
as.Date() |>
as.Date(origin = "1970-01-01") |>
unique() |>
format("%Y") |>
unique() |>
Expand Down

0 comments on commit b5aef51

Please sign in to comment.