getVisits: getVisits

getVisitsR Documentation

getVisits

Description

Returns the contents of the Visits slot of an NCRNbirds object. The returned data can be filtered to meet various criteria.

Usage

getVisits(
  object,
  parks = NA,
  points = NA,
  years = NA,
  times = NA,
  visits = NA,
  reps = NA,
  site = NA,
  dist = NA,
  wind = NA,
  sky = NA,
  output = "dataframe"
)

Arguments

object

An NCRNbirds object or a list of such objects.

parks

A character vector of park codes. Only data from these parks will be returned.

points

A character vector of point names. Only data from these points will be returned.

years

A numeric vector. Returns data only from points where the years the point was visited matches one of the values in years. The year a visit takes place is determined by the Year column in the visits slot which is derived from the information in the EventDate column.

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.

visits

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

reps

A length 1 numeric vector,defaults to NA. Returns only data from points and years where the point has been visited at least reps times in the year.

site

Character. Select sites in "Forest" or "Grassland" habitats. Defaults to selecting both site types.

dist

Character. Filters data by disturbance code(s). See network documentation for list and meanings of codes.

wind

Numeric. Filters data by wind code(s). See network documentation for list and meanings of codes.

sky

Numeric. Filters data by sky condition code(s). See network documentation for list and meanings of codes.

output

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

Details

This function returns point data either from a single NCRNbirds object or a list of such objects. The default output is adata.frame. However, if object is a list and output is "list" then a list of data.frames will be returned. The name of each element in this list will correspond to the ParkCode in each NCRNbirds object.


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