Skip to content

[Feature]: Add defaults to create_tables_doc and create_figures_doc out from create_template #331

@Schiano-NOAA

Description

@Schiano-NOAA

Is your feature request related to a problem? Please describe.

The default tables and figures document is located within create_template and is repetitive for the code of the package. Please move this code from create_template to create_figures_doc and create_tables_doc, respectively.

This will require the dev to call those functions in create_template and potentially create a new argument in each function to specify the name of the doc so that the switch in the create_template function remains relevant and helpful.

Describe the solution you would like.

Move the code from the create_template fxn

asar/R/create_template.R

Lines 578 to 581 in d3070f3

tables_doc <- paste0(
"# Tables \n \n",
"Please refer to the `stockplotr` package downloaded from remotes::install_github('nmfs-ost/stockplotr') to add premade tables."
)

asar/R/create_template.R

Lines 592 to 595 in d3070f3

figures_doc <- paste0(
"# Figures \n \n",
"Please refer to the `stockplotr` package downloaded from remotes::install_github('nmfs-ost/stockplotr') to add premade figures."
)

to their respective functions and call in create_tables_doc() and create_figures_doc() in create template.

Also add in a new argument to those functions of file or name so that the user can name it where the default is 08_tables.qmd and 09_figures.qmd

It would look something like this when coded in:

create_tables_doc(
  subdir = subdir,
  name = tables_doc_name
)
create_figures_doc(
  subdir = subdir,
  name = figures_doc_name
)

Describe alternatives you have considered

Keep as is

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions