check_assertions: Check assertions in occurrences object

Description Usage Arguments Value References Examples

Description

This provides a data.frame detailing the assertions that are found in a dataset returned from occurrences.

Usage

1

Arguments

x

list: an object returned from occurrences

Value

A dataframe of assertions column names, descriptions and categories/error codes. If no assertions are in the dataset, NULL is returned.

References

https://api.nbnatlas.org/, http://biocache.ala.org.au/ws/assertions/codes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#download species data with all possible assertions
## Not run: 
 x <- occurrences(taxon="golden plover",download_reason_id=10,qa=nbn_fields("assertions")$name)
 asserts <- check_assertions(x) #data.frame of assertions, their description and column names
 asserts$description # List out descriptions of all (current) assertions

 tmp <- x$data[,names(x$data) %in% asserts$name] ## assertion columns from data
 which(colSums(tmp)>0) ## discard those not seen in the data

## End(Not run)

fozy81/NBN4R documentation built on May 19, 2019, 8:22 a.m.