Skip to content

Can't do "by_stock = stocks, by_area = TRUE" in g3_parameterized #258

@lentinj

Description

@lentinj
stocks <- list(
  imm = g3_stock(c(species = 'bli', maturity = 'imm'), 1:10 * 10) |>
    g3s_age(minage = 2, maxage = 7) |>
    g3s_livesonareas(areas[c('a', 'b', 'c')])
)

g3_parameterized('Ka', by_stock = stocks, by_area = TRUE)
Error in g3_parameterized("Ka", by_stock = stocks, by_area = TRUE) :
  One of by_stock/by_predator should be set if by_area is set
Environment:
  1: g3_parameterized("Ka", by_stock = stocks, by_area = TRUE)
  2: stop("One of by_stock/by_predator should be set if by_area is set")

Not sure there's any reason this is missing, it should be easier than the currently-implemented cases, we need to dig out __areas from all supplied stocks, and use the intersection of them.

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