myebirdscumul: Calculate cumulative species counts gouped by year, country,...

Description Usage Arguments Value Author(s) Examples

Description

myebirdscumul calculates cumulative species counts based on data dumped by eBird (Download page: http://ebird.org/ebird/downloadMyData) after it has been cleaned with ebirdclean.

Usage

1
2
myebirdscumul(mydata, years = 1900:format(Sys.Date(), "%Y"),
  grouping = c("Year", "Country"), cum.across = "Month", wide = FALSE)

Arguments

mydata

Data frame provided by ebirdclean.

years

Range of years to calculate across, default is between 1900 and current year.

grouping

Character vector specifying how the data should be grouped for counting. Must be composed of "Year", "Country", and/or "Month". This vector is passed on directly to group_by_.

cum.across

Grouping of variable that cumulative counts should be done across. For example, if you want to count cumulative across months within each year, then grouping should be "Year" and cum.across = "Month".

wide

Logical value specifying whether output should be returned in wide format. Defaults to FALSE.

Value

A data frame containing cumulative counts divided into specified groups. If wide = FALSE then it returns a combination of the following columns, depending on grouping specified:

"Year" Year

"Country" Country using two letter codes.

"Month" Month, using full month name (from month.name()).

"cumul" Cumulative species count for the specified Year, Country, and Month.

If in wide format, then the first column(s) consist of the values in grouping that are not equal to wide, while the remaining columns are unique values of the argument specified in wide.

Author(s)

Sebastian Pardo [email protected]

Examples

1
2
3
4
5
## Not run: 
mylist <- ebirdclean() # CSV must be in working directory
myebirdscumul(mylist, grouping = c("Country", "Year"), years = 2013:2015, cum.across = c("Month"))

## End(Not run)

sebpardo/myebird documentation built on May 29, 2019, 5:53 p.m.