View source: R/plotDetectionBoxplot.R
| plotDetectionBoxplot | R Documentation |
Plots time series of boxplots showing detection data across time
plotDetectionBoxplot(
x,
group = "species",
facet = NULL,
color = hue_pal(),
bin = "day/week",
combineYears = FALSE,
effort = NULL,
dropZeroes = FALSE,
returnData = FALSE
)
x |
dataframe of detection data read in with loadDetectionData |
group |
name(s) of columns indicating which rows of |
facet |
if not |
color |
only used if |
bin |
time bins to use for generating plot, must be a character of
format "time1/time2" where "time1" will be the y-axis of the plot and
"time2" will be the x-axis of the plot. Times are one of "hour", "day",
"week", or "month" (e.g. |
combineYears |
logical flag to combine all observations to display as a single "year" |
effort |
if not |
dropZeroes |
logical flag to remove boxplots where all observations are zero (these would normally appear as a flat line at zero) |
returnData |
if |
The combination of group, facet, and
combineYears determine the data points that make up each boxplot.
If combineYears=TRUE, then there will be a different point for
each year. There will additionally be separate points for each different
value of the columns in group, excluding the column used for
facet (since these points are instead split out to different
facetted plots).
For example, if you have data from a single location, then settings of
combineYears=FALSE, group='species', and facet=NULL
will create a plot where each point in a boxplot represents the number
of detections for a species. If you change to facet='species',
then the result will show a multi panel plot where each boxplot is just
a single point. Then changing to combineYears=TRUE will show
a multi panel plot where each point in a boxplot is the number of
detections for that panel's species in different years.
a ggplot object
Taiki Sakai taiki.sakai@noaa.gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.