Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pbs-assess/gfplot
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrandin committed Oct 21, 2024
2 parents 56ac899 + 96fda8c commit c8e59db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/maturity.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ fit_mat_ogive <- function(dat,
link <- match.arg(link)

if(!("month" %in% names(dat))){
dat <- mutate(dat, month = lubridate::month(trip_start_date))
if(("sample_date" %in% names(dat))){
dat <- mutate(dat, month = lubridate::month(sample_date))
} else {
dat <- mutate(dat, month = lubridate::month(trip_start_date))
print("Assigned a month using trip start dates rather than sample dates.")
}
}

dat <- dat %>% filter(maturity_convention_code != 9)
Expand Down

0 comments on commit c8e59db

Please sign in to comment.