Skip to content

[Bug]: 'output_and_quantities' chunk in skeleton missing line to load in model results #416

@sbreitbart-NOAA

Description

@sbreitbart-NOAA

Describe the bug

When create_template() is run with rerender_skeleton = TRUE and the model results are added, the 'output_and_quantities' chunk in the skeleton is missing the line to load in model results and the code below that doesn't work.

Describe how to reproduce the bug

Example from the NSAW workshop:

create_template(
    format = "pdf",
    type = "SAR",
    office = "NWFSC",
    region = "U.S. West Coast",
    species = "Petrale sole",
    spp_latin = "Eopsetta jordani",
    authors = c("Samantha Schiano" = "OST", "Jane Doe" = "SWFSC-LJCA"),
    file_dir = getwd()
)

petrale <- stockplotr::convert_output(
    file.path("example_output", "Report.sso"),
    save_dir = file.path(getwd(), "report", "petrale_conout.rda"))

asar::create_template(
    rerender_skeleton = TRUE,
    file_dir = file.path(getwd(), "report"),
    authors = c("John Doe"="NEFSC"),
    model_results = file.path(getwd(), "report", "petrale_conout.rda"),
    custom = TRUE,
    new_section = "Changes to the Model",
    section_location = "after-introduction"
)

Screenshots

The top of the 'output_and_quantities' chunk:

#| label: 'output_and_quantities'
#| warning: false 
#| eval: true 
#| include: false
# load converted output from stockplotr::convert_output() 

# Call reference points and quantities below 
output <-file.path(getwd(), "report", "petrale_conout.rda") |>
  dplyr::mutate(estimate = as.numeric(estimate), 
    uncertainty = as.numeric(uncertainty))
source("preamble.R") 
# Available quantities
start_year
...

Which OS are you seeing the problem on?

Windows

Which version of asar are you seeing the problem on?

2.0.1

Additional Context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions