birdRichness: birdRichness

birdRichnessR Documentation

birdRichness

Description

Returns the number of bird species found in a park, at a point or a collection of points.

Usage

birdRichness(
  object,
  points = NA,
  AOU = NA,
  years = NA,
  visits = NA,
  byPark = FALSE,
  byYear = FALSE,
  byPoint = FALSE,
  byGuild = FALSE,
  guildType = NA,
  guildCategory = NA,
  wide = FALSE,
  name.class = "short",
  output = "total",
  ...
)

Arguments

object

An NCRNbirds object or a list of such objects or a data.frame like that created by getBirds.

points

A character vector passed to getBirds. The names of one or more points where the data was collected. NA(the default) measures richness from all points.

AOU

A character vector passed to getBirds. One or more AOU (American Ornothological Union) codes of bird species. NA (the default) measures richness based on all species, otherwise only species listed in AOU will be counted.

years

A vector of numbers passed to getBirds. NA (the default) will count species regardless of the year they were monitored, otherwise only data from years listed in years will be used. See details below for how years where no visits took place are handeled.

visits

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

byPark

Logical. If FALSe (the default) the total species richness across all parks will be returned as a single numeric value, if TRUE a data.frame will be returned with each row a different park and its corresponding species richness.

byYear

Logical. If FALSE (the default) the total species richness across all years will be returned a single numeric value, if TRUE a data.frame will be returned with each row a different year and its corresponding species richness.

byPoint

Logical ,if FALSE (the default) the total species richness across all points will be returned a single numeric value, if TRUE a data.frame will be returned with each row a different plot and its corresponding species richness.

byGuild

Logical,if FALSE (the default) the total species richness across all points will be returned a single numeric value, if TRUE a data.frame will be returned with each row a different response guild plot and its corresponding species richness. The guild will be determined by the guildType and guildCateogory arguments.

guildType

The type of guild as determined by the BCI. Passed on to the type argument of getGuilds

guildCategory

The guild category as determined by the BCI. Passed on to the categories argument of getGuilds. Should be only one category.

wide

Defaults to FALSE. If TRUE and byYear is TRUE then there will be a column for each year and row for each park or point. Otherwise there will be a single Year column to indicate the year.

name.class

Indicates if park names should appear as "code" the defaults or as "short" or "long" names from getParkNames

output

Either "total" (the default) or "list". Note that this must be in quotes. Determines the type of output from the function, when object is a list. "total" will give the number of distinct species found across all parks. "list" will return a list, with each entry to the list corresponding to the species richness of one of the NCRNbirds objects in the input list.

...

additional arguments passed to getBirds. Any argument which is a valid argument for getBirds can be used here.

Details

This function calculates the species richness for a park, group of parks, group of monitoring points etc. Species richness is the number of different species found, regardless of their abundance. The function works by first getting the monitoring data by using the getBirds function and then counting the number of unique birds found. All of the options for combining or subsetting data in getBirds will work for birdRichness including subsetting by year and monitoring point. If there is no data, due to no sampling occuring at hte specified time and place, NA will be returned.

How years with no visits are handled depends on wth is supplied in object. If the object is a data.frame and years are specified, it is assumed that result is wanted for all of those years. Therefore if some years are not present in the data, they will be assigned a richness of zero. If the object is a NCRNbirds object or a list of such objects, then getVisits will be called to determine which years samplign took place in. Only years with vistis will be returned, and years where no birds were observed will be given a richenss of zero.


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