Skip to content

Commit

Permalink
Update start_rains.R
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyclements authored Dec 10, 2024
1 parent bd5d46a commit a12b5a4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/start_rains.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ start_rains <- function(data, date_time, station = NULL, year = NULL, rain = NUL

# Do we have a shifted start doy?
if (!is.null(s_start_doy)){
data <- shift_dates(data = data, date = date_time, s_start_doy = s_start_doy - 1)
year <- "year"
doy <- "doy"
# The shifting has already happened in R-Instat
#data <- shift_dates(data = data, date = date_time, s_start_doy = s_start_doy - 1)
year <- "s_year"
doy <- "s_doy"
data[[doy]] <- data[["s_doy"]]
data[[year]] <- data[["s_year"]]
} else {
Expand Down

0 comments on commit a12b5a4

Please sign in to comment.