Returns three plots showing the variable of interest against time (as month or month/year). Plots are raw points by date, number of observations by date, and measures of a representative observation by date.
Usage
temp_plot(
dat,
project,
var.select,
len.fun = "length",
agg.fun = "mean",
date.var = NULL,
alpha = 0.5,
pages = "single",
text.size = 8
)
Arguments
- dat
Primary data containing information on hauls or trips. Table in FishSET database contains the string 'MainDataTable'.
- project
String, name of project.
- var.select
Variable in
dat
to plot against a date variable.- len.fun
Method,
"length"
returns the number of observations,"unique"
returns the number of unique observations,"percent"
returns the percentage of total observations.- agg.fun
Method to aggregate
var.select
by date. Choices are"mean"
,"median"
,"min"
,"max"
, or"sum"
.- date.var
Date variable in
dat
. Defaults to first date variable indat
set if not defined.- alpha
The opaqueness of each data point in scatterplot. 0 is total transparency and 1 is total opaqueness. Defaults to .5.
- pages
Whether to output plots on a single page (
"single"
, the default) or multiple pages ("multi"
).- text.size
Text size of x-axes.
Details
Returns three plots showing the variable of interest against time (as month or month/year). Plots are raw points by time, number of observations by time, and aggregated variable of interest by time.
Examples
if (FALSE) {
temp_plot(pollockMainDataTable, project='pollock',
var.select = 'OFFICIAL_TOTAL_CATCH_MT', len.fun = 'percent',
agg.fun = 'mean', date.var = 'HAUL_DATE')
temp_plot(pollockMainDataTable, project='pollock',
var.select = 'OFFICIAL_TOTAL_CATCH_MT', len.fun = 'length',
agg.fun = 'max')
}