Skip to content

Commit

Permalink
fix minor bug in tidy_maturity_months should it ever be applied with …
Browse files Browse the repository at this point in the history
…usability_codes == NULL
  • Loading branch information
ecophilina committed Jan 6, 2025
1 parent 66ca660 commit 34e3839
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/mat-freq-month.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ NULL
tidy_maturity_months <- function(dat, months = seq(1, 12),
usability_codes = c(0, 1, 2, 6), french = FALSE) {

if (!is.null(usability_codes))
if (!is.null(usability_codes)){
dat <- filter(dat, .data$usability_code %in% usability_codes)
}

dat <- mutate(dat, month = lubridate::month(trip_start_date))
dat <- filter(dat, month %in% months)
Expand Down

0 comments on commit 34e3839

Please sign in to comment.