occurrences_s3: Summarize, filter and subset occurrence data

Description Usage Arguments Details References Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## 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

...

not currently used

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 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.

Details

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

References

https://api.ala.org.au/

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
#download some observations
x <- occurrences(taxon = "Amblyornis newtonianus",download_reason_id = 10,
email = "ala4r@ala.org.au")

#summarize the occurrences
summary(x)

#keep spatially unique data at 0.01 degrees (latitudeOriginal and longitudeOriginal)
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)

## End(Not run)

AtlasOfLivingAustralia/ALA4R documentation built on Sept. 16, 2021, 4:33 a.m.