-
Notifications
You must be signed in to change notification settings - Fork 0
getters::get_wa #3
Description
Perhaps this is not an issue, other than that I need to learn more.
get_wa <- function(models,
models_names,
gear,
area = 1,
group = 1,
sex = 0){
verify_models(models, models_names)
dfs <- lapply(seq_along(models), function(x){
models[[x]]$dat$weight.at.age %>%
as_tibble() %>%
mutate(region = models_names[x])
})
df <- bind_rows(dfs) %>%
filter(area %in% area,
group %in% group,
sex %in% sex) %>%
left_join(gear, by="gear") %>%
select(-gear) %>%
rename(gear = gearname) %>%
mutate(region = fct_relevel(region, models_names))
df
}
dfs contains columns "gear", "area", and "group", all of which are = 1.
This translates to gear being classified as "other". We should be using seine gear. Also the code that creates df, makes me think that dfs columns should not all be =1.