SumRelAbund: SumRelAbund

SumRelAbundR Documentation

SumRelAbund

Description

Produces a summary of raw detections by species for plotting and analysis.

Usage

SumRelAbund(
  object,
  parks = NA,
  points = NA,
  AOU = NA,
  years = NA,
  times = NA,
  band = 1,
  visits = NA,
  CalcByYear = FALSE,
  max = TRUE,
  sort = FALSE,
  abund = 10,
  output = "dataframe",
  ...
)

Arguments

object

An NCRNbirds object or a list of such objects.

parks

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

points

A character vector. The names of one or more points where the data was collected.

AOU

A character vector. One or more AOU (American Onothological Union) codes of bird species.Detections will be summed by each individual species.

years

A vector of numbers. Will return only data from the indicated years.

times

A numeric vector of length 1 passed on to getVisits and getBirds. 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.

band

A numeric vector. Defaults to 1. Only observations whose Distance_id field matches a value in band will be returned.

visits

The visits that will be used for the matrix. Defautls to NA. See Details below,

CalcByYear

Logical, if TRUE, will calculate mean detections across all visits per year. Defaults to FALSE, calculating per visit.

max

Logical, if TRUE (default), relative abundance will be calculated from the maximum count among visits in a given year.

sort

Logical, if TRUE, when multiple species are selected it will calculate and sort relative abundance per species. See abund.

abund

Numeric, When sort = TRUE, used to provide a numeric value to select the most abundant species. E.g., abund = 10 will return mean detections of the top 10 species. You can use the returned data.frame to provide species AOU.

output

Either "dataframe" (the default) or "list". Note that this must be in quotes. Determines the type of output from the function.

...

Additional arguments passed to getChecklist

Details

Summarizes relative abundance by species (mean detections per point) for a NCRNbirds object or a list of such objects.

If visits is left as NA then the visits used will be 1 through the number of visits indicated in the visits slot. Otherwise a numeric vectore e.g. c(1,2) can be used to select which visits are used.

SumRelAbund requires at least 2 monitoring points or at least 2 years of data to be specified, unless both CalcByYear and sort are TRUE.

If sort is TRUE, then data will be combined accross the visits, points and years indicated by the other arguments.


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