detectsPlot: detectsPlot

detectsPlotR Documentation

detectsPlot

Description

Plots bird detections (relative abundance) over time.

Usage

detectsPlot(
  object,
  parks = NA,
  years = NA,
  points = NA,
  visits = NA,
  times = NA,
  max = F,
  plot_title = NA,
  point_num = NA,
  se = FALSE,
  add_line = TRUE,
  output = "total",
  plot = TRUE,
  ...
)

Arguments

object

An NCRNbirds object a list of such objects, or a data.frame like that produced by CountXVisit().

parks

A character vector of park codes. Only visits within these parks will be returned.

years

A numeric vector. Indicates which years should be graphed.

points

A character vector of point names. Only these points will be used.

visits

A length 1 numeric vector, defaults to NA. Returns data only from the indicated visits.

times

A numeric vector of length 1. Returns only data from points where the number of years that a point has been vistied is greater or equal to the value of times. This is determined based on the data found in the Visits slot.

max

Logical. If FALSE, the default, then the annual mean will be calculated from each visit separately in each year. If TRUE then the annual mean will be calculated from the maximum no. detected across all visits in each year.

plot_title

Optional, A title for the plot.

point_num

An optional list of numeric vector indicating the number of points sampled each visit of each year. Each visit is a separte elemnet in the list. If object is a NCRNbirds object or a list of such objects, then this will be calculated automatically. If object is a data.frame than this can be provided by the user.

se

Logical. Add Standard error to the plot. TRUE or FALSE, defaults to FALSE

add_line

Logical. Connects points in plot when TRUE. Defaults to TRUE.

output

Either "total" (the default) or "list". Only used when object is a list.

plot

Logical. Return plot TRUE (default) or data.frame FALSE.

...

Additional arguments passed to CountXVisit

Details

This function produces a graph of species detections over time. It does this by using the output of the CountXVisit function. The data is then passed on to ggplot2 for graphing.


NCRN/NCRNbirds documentation built on Aug. 28, 2023, 12:12 p.m.