Skip to content

Commit

Permalink
Update annual_rain.R
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyclements authored Dec 10, 2024
1 parent a12b5a4 commit 6035df4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions R/annual_rain.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ annual_rain <- function(data, date_time, rain, year = NULL, s_start_doy = NULL,
'total_rain' or 'n_rain' must be TRUE.")
}
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[[year]] <- data[["s_year"]]
}
summaries <- c()
Expand Down

0 comments on commit 6035df4

Please sign in to comment.