Learn R Programming

BIRDS (version 0.2.0)

exportBirds: Export single variables from SummarisedBirds objects

Description

Export single variables from SummarisedBirds objects

Usage

exportBirds(x, dimension, timeRes, variable, method = "sum")

Arguments

x

a SummarizedBirds-object

dimension

a character string indicating if the export should be "spatial" or "temporal"

timeRes

A character string indicating what temporal resolution should be used. For Spatial export the function accepts NULL, "yearly", "monthly" or "month". For temporal export the function accepts "yearly", "monthly", "daily" or "month".

variable

a character string indicating which variable should be exported, "nObs", "nVis", "nSpp", "nDays", "nCells" or "avgSll" . For timeRes = c(NULL, "month") the function also accepts "nYears".

method

Only applicable to timeRes = "month". A variable specifying which statistical method should be applied. The function accepts "sum", "median", "mean".

Value

an xts time series (if dimension = "temporal"), a named vector (if dimension = "temporal" and timeRes = "month"), or a sf (if dimension = "spatial")

Examples

Run this code
# NOT RUN {
grid <- makeGrid(searchPolygon, gridSize = 10)
SB <- summariseBirds(organizeBirds(bombusObsShort), grid=grid)
EB <- exportBirds(SB, "spatial", "month", "nDays", "median")
# }

Run the code above in your browser using DataLab