create_sk_flextable_list: Create a List of Flextable Objects

Description Usage Arguments Details Value Author(s)

View source: R/create_sk_flextable_list.R

Description

Create a list of flextable objects to display Seasonal Kendall results in the NERRS reserve level template

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
create_sk_flextable_list(
  sk_result,
  stations,
  param,
  trend_col = c("#247BA0", "#A3DFFF", "#D9D9D9", "white"),
  font_col_default = "#444E65",
  font_sz_stn = 6,
  font_sz_result = 12,
  font_sz_head = 6,
  ht_head = 0.28,
  ht_body = 0.202,
  is_swmp = TRUE,
  stn_name = NULL,
  stn_abbrev = NULL,
  par_name = NULL
)

Arguments

sk_result

a data.frame of reformatted results from sk_seasonal

stations

chr, vector of stations to be displayed

param

chr, vector of parameters to be displayed

trend_col

chr, a four element vector that specifies colors for increasing, decreasing, no change, and insufficient data trends

font_col_default

chr, default color to be used for trend table

font_sz_stn

int, specify the font size of displayed station names

font_sz_result

int, specify the font size of the displayed results

font_sz_head

int, specify the font size of the table header row

ht_head

num, specify the cell height of the table body rows. Units for this parameter are in inches.

ht_body

num, specify the cell height of the table header row. Units for this parameter are in inches.

is_swmp

logical, are the station names and parameter names consistent with SWMP station and parameter names? If either of these conditions is false then this parameter should be set to FALSE and then the user should define stn_name, stn_abbrev, and par_name. default is TRUE.

stn_name

chr, a list of full station names that the user would like to add to the trend table (e.g., "Cat Point")

stn_abbrev

chr, a list of station abbreviations that the user would like to add to the trend table (e.g., "CP" as an abbreviation for Cat Point).

par_name

chr, a list of parameter names to be used if the names to not match standard CDMO parameters.

Details

This function is intended for internal use with the NERRS reserve level reporting scripts. Using the results from the reserve level trend analysis, create_sk_flextable_list creates a list of two flextable objects to be displayed in the NERRS reserve level template. The first flextable in the list contains the two-letter station IDs for each station and the full location name of each station. The second table lists the seasonal kendall results and the names of the parameters of interest.

Value

Returns a list of flextable objects

Author(s)

Julie Padilla


SWMPrExtension documentation built on Aug. 30, 2020, 5:06 p.m.