Skip to content

getters::get_wa #3

@Sages11

Description

@Sages11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions