Skip to content

Commit

Permalink
Spelling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Schiano-NOAA committed Mar 29, 2024
1 parent f75d187 commit bf369a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 54 deletions.
2 changes: 1 addition & 1 deletion R/paste_child.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Write R Chunk to Add Child Document
#'
#' @param x section .qmd file to add into the template, options for sections are in the 'skeleton' folder; only select XX_section.qmd files and not a, b, c... subiles
#' @param x section .qmd file to add into the template, options for sections are in the 'skeleton' folder; only select XX_section.qmd files and not a, b, c... subfiles
#' @param label description for the child document being added (short - one/two words max)
#'
#' @return Formatting R chunk for child document to add section into the template/skeleton.
Expand Down
60 changes: 7 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,34 @@
<!-- badges: start -->
<!-- badges: end -->

This package is currently in development. There are two proposed methods to use this tool and build a stock assessment report.
This package is currently in development.

1) main: Use this repository as a template and use `create_template.R` to generate a template and create a skeleton from `inst/templates/skeleton` folder dependent on the analyst's region.

2) draft-template: Use this repository as one would a package. Download using the directions below and fill in `create_template.R` function with the desired parameters (follow example below) to create a template quarto document to be rendered to create a stock assessment report.
Use this repository as one would a package. Download using the directions below and fill in `create_template.R` function with the desired parameters (follow example below) to create a template quarto document to be rendered to create a stock assessment report.

Please refer to examples below on how to utilize both options.

The goal of ASAR is to automate stock assessment reports for NOAA science centers so they are reproducible and cohesive across the nation. This project intends to create a streamlined workflow that allows the analyst to create a customized report tailored to their needs and requirements by the SSC, council, or other regional management organizations.

## Installation

First please check to make sure `tinytex` package is installed on your machnie. If not please install using the following lines:
First please check to make sure `tinytex` package is installed on your machine. If not please install using the following lines:

```r
install.packages("tinytex")
```
library(tinytex)

To install `ASAR` as a template repository:

(1) Navigate to the main page of the [repository](https://github.com/Schiano-NOAA/ASAR)

(2) Above the file list, click **Use this template**.

(3) Select **Create a new repository**.

![](https://docs.github.com/assets/cb-77734/mw-1440/images/help/repository/use-this-template-button.webp)

To install `ASAR` as a package:
```
Then install the package:

```r
install.packages("remotes")

remotes::install_github("Schiano-NOAA/ASAR@draft-template")
remotes::install_github("Schiano-NOAA/ASAR")
```

Here we are installing the branch which is designed as a package.

## Example

The following is a basic example to render a stock assessment report for a particular region in the U.S.:

### Option A

Downloaded as a template repo:

``` r
source(here::here('R', 'create_template.R'))
source(here::here('R', 'write_title.R'))
source(here::here('R', 'paste_child.R'))
source(here::here('R', 'chunkr.R'))
source(here::here('R', 'generate_citation.R'))

create_template(
new_template = TRUE,
format = "pdf",
office = "SEFSC",
region = "Gulf of Mexico",
species = "Red Snapper",
spp_latin = "Lutjanus campechanus",
year = 2021,
author = c("John Snow", "Danny Phantom", "Patrick Star"),
include_affiliation = TRUE,
parameters = FALSE,
type = "RT",
model_results = "results.Rdata",
model = "WHAM"
)
```

### Option B

Download as a package:

```r
ASAR::create_template(
new_template = TRUE,
Expand Down

0 comments on commit bf369a6

Please sign in to comment.