Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getters::get_wa #3

Open
Sages11 opened this issue Aug 6, 2021 · 0 comments
Open

getters::get_wa #3

Sages11 opened this issue Aug 6, 2021 · 0 comments

Comments

@Sages11
Copy link
Collaborator

Sages11 commented Aug 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant