occurrences_s3 {ALA4R}R Documentation

Summarize, filter and subset occurrence data

Description

Set of S3 methods to summarize, filter and get unique occurrence data retrieved using occurrences. This uses information based on selections of assertions (quality assurance issues ALA has identified), spatial and temporal data.

Usage

## S3 method for class 'occurrences'
summary(object, ...)

## S3 method for class 'occurrences'
unique(x, incomparables = FALSE, spatial = 0,
  temporal = NULL, na.rm = FALSE, ...)

## S3 method for class 'occurrences'
subset(x, remove.fatal = TRUE,
  exclude.spatial = "error", exclude.temporal = "error",
  exclude.taxonomic = "error", max.spatial.uncertainty,
  keep.missing.spatial.uncertainty = TRUE, ...)

Arguments

object

list: an 'occurrence' object that has been downloaded using occurrences

x

list: an 'occurrence' object that has been downloaded using occurrences

incomparables

logical/numeric: currently ignored, but needed for S3 method consistency

spatial

numeric: specifies a rounding value in decimal degrees used to to create a unique subset of the data. Value of 0 means no rounding and use values as is. Values <0 mean ignore spatial unique parameter

temporal

character: specifies the temporal unit for which to keep unique records; this can be by "year", "month", "yearmonth" or "full" date. NULL means ignore temporal unique parameter

na.rm

logical: keep (FALSE) or remove (TRUE) missing spatial or temporal data

remove.fatal

logical: remove flagged assertion issues that are considered "fatal"; see check_assertions

exclude.spatial

character vector: defining flagged spatial assertion issues to be removed. Values can include 'warnings','error','missing','none'; see check_assertions

exclude.temporal

character vector: defining flagged temporal assertion issues to be removed. Values can include 'warnings','error','missing','none'; see check_assertions

exclude.taxonomic

character vector: defining flagged taxonomic assertion issues to be removed. Values can include 'warnings','error','missing','none'; see check_assertions

max.spatial.uncertainty

numeric: number defining the maximum spatial uncertainty (in meters) one is willing to accept.

keep.missing.spatial.uncertainty

logical: keep (FALSE) or remove (TRUE) information missing spatial uncertainty data.

...

not currently used

Details

unique will give the min value for all columns that are not used in the aggregation.

Author(s)

Atlas of Living Australia support@ala.org.au

References

http://api.ala.org.au/

http://stat.ethz.ch/R-manual/R-devel/library/methods/html/Methods.html

Examples

#download some observations
x=occurrences(taxon="Amblyornis newtonianus",download_reason_id=10)

#summarize the occurrences
summary(x)

#keep spatially unique data at 0.01 degrees (latitude and longitude)
tt = unique(x,spatial=0.01)
summary(tt)

#keep spatially unique data that is also unique year/month for the collection date
tt = unique(x,spatial=0,temporal='yearmonth')
summary(tt)

#keep only information for which fatal or "error" assertions do not exist
tt = subset(x)
summary(tt)

[Package ALA4R version 1.01 Index]