renderSummary: Render reports

View source: R/renderSummaries.R

renderSummaryR Documentation

Render reports

Description

This function will render a PDF report from an RMarkdown (Rmd) script.

Usage

renderSummary(
  my_report,
  station_id,
  station_name = NULL,
  my_year = NULL,
  my_dir = NULL
)

Arguments

my_report

Type of report to render. The options are a calendar year ("calendar_year") and a water year ("water_year") report.

station_id

The character string of the station_id field from stations..

station_name

Optional. A string to be use for the station name in the report. Default is NULL. If NULL the station name will be pulled from stations. This is displayed in several location in the report and the default name can be changed.

my_year

Optional. The four-digit year of interest. Default is NULL. The current year will be used if left as NULL.

my_dir

Optional. String of directory path to save report to. Default is NULL. If NULL, the report is saved to the your desktop.

Value

A PDF.

Examples

## Not run: 
#' library(climateAnalyzeR)

# Render water year report for current water year
renderSummary(my_report = "water_year", station_id = "hans_flat_rs")

# Render calendar year report for 2018 with custom station name
renderSummary(my_report = "calendar_year", station_id = "canyonlands_theneck",
              station_name = "Island in the Sky, Canyonlands National Park",
              my_year = 2018)

## End(Not run)

scoyoc/climateAnalyzeR documentation built on April 19, 2023, 9:57 p.m.