subset_pred_data: Subset Pre-Processed Model Predictions

View source: R/plotting.R

subset_pred_dataR Documentation

Subset Pre-Processed Model Predictions

Description

Processing predictions takes a while, this function allows querying pre-calculated predictions so the user need not re-calculate everytime.#'

Usage

subset_pred_data(response, settings = list())

Arguments

response

Character; one of "effort", "total_cpt", "chinook_comp", "chum_comp", or "sockeye_comp"

settings

list specifying which covariate settings to subset the predicted values for. See details.

Details

The settings argument must be a list, and if it is empty (the default), the acceptable elements will be populated with preset values. The following elements are acceptable: * settings$day: numeric; defaults to 12:46 * settings$hours_open: numeric; must contain any combination of 6, 12, 18, 24, defaults to 12 * settings$p_before_noon: numeric; must contain any combination of 0.25, 0.5, 0.75, 1; defaults to 0.5 * settings$fished_yesterday: logical; defaults to FALSE * settings$weekend: logical; defaults to FALSE * settings$CAT_total_btf_cpue: character, must contain any combination of "q10", "q25", "q50", "q75", "q90"; defaults to "q50" * settings$CAT_chinook_btf_comp: same as settings$CAT_total_btf_cpue * settings$CAT_chum_btf_comp: same as settings$CAT_total_btf_cpue * settings$CAT_sockeye_btf_comp: same as settings$CAT_total_btf_cpue

Value

data.frame with the pre-processed predictions (column pred_response) at each combination of queried predictor variables.

Note

Because not every predictor variable is used for all responses, it is possible to change the settings argument and receive the same output. The object containing all pre-processed predictions for all responses can be found in KuskoHarvPred:::pred_data.


bstaton1/KuskoHarvPred documentation built on Aug. 15, 2024, 3:30 p.m.