richnessPlot: richnessPlot

richnessPlotR Documentation

richnessPlot

Description

Plots species richness over time.

Usage

richnessPlot(
  object,
  years = NA,
  points = NA,
  visits = NA,
  times = NA,
  plot_title = NA,
  point_num = NA,
  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 birdRichness().

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 visited is greater or equal to the value of times. This is determined based on the data found in the Visits slot.

plot_title

Optional, A title for the plot.

point_num

An optional numeric vector indicating the number of points sampled each year. 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.

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 birdRichness

Details

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


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