Skip to content

[BUG]: plot_spawning_biomass grabs additional values #183

@Schiano-NOAA

Description

@Schiano-NOAA

When values exist where there is a prefix to spawning_biomass in plot_spawning_biomass then both are plotted.

Need to either add ^ to the beginning of the grepl to fix this, but now this needs to be tested with all of the other examples

This part can be edited:

prepared_data <- filter_data(
dat = dat,
label_name = "spawning_biomass$",
geom = geom,
era = era,
group = group,
facet = facet,
module = module,
scale_amount = scale_amount,
interactive = interactive
)

I found the issue from a FIMS output after running:

knitr::purl(
  input = 'https://raw.githubusercontent.com/NOAA-FIMS/FIMS/refs/heads/main/vignettes/fims-demo.Rmd',
  output = 'fims_demo.R',
  documentation = 0
)
source('fims_demo.R')
sb <- dplyr::filter(output, grepl("spawning_biomass", label))
unique(sb$label) # results in >1 label name

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