ala_config {ALA4R}R Documentation

Get or set configuration options that control ALA4R behaviour

Description

Get or set configuration options that control ALA4R behaviour

Usage

ala_config(...)

ala_reasons()

Arguments

...

Options can be defined using name=value. Valid options are:

  • reset: ala_config("reset") will reset the options to their default values

  • caching string: caching can be "on" (results will be cached, and any cached results will be re-used), "refresh" (cached results will be refreshed and the new results stored in the cache), or "off" (no caching, default).

  • cache_directory string: the directory to use for the cache. By default this is a temporary directory, which means that results will only be cached within an R session and cleared automatically when the user exits R. The user may wish to set this to a non-temporary directory for caching across sessions. The directory must exist on the file system.

  • verbose logical: should ALA4R give verbose output to assist debugging? (default=FALSE)

  • warn_on_empty logical: should a warning be issued if a request returns an empty result set? (default=FALSE)

  • user_agent string: the user-agent string used with all web requests to the ALA servers. Default = "ALA4R" with version number, R version and date and user platform

  • download_reason_id numeric or string: the "download reason" required by some ALA services, either as a numeric ID (currently 0–11) or a string (see ala_reasons() for a list of valid ID codes and names). By default this is NA. Some ALA services require a valid download_reason_id code, either specified here or directly to the associated R function.

  • base_url_spatial string: the base url for spatial web services (default="http://spatial.ala.org.au/ws/")

  • base_url_bie string: the base url for BIE web services (default="http://bie.ala.org.au/ws/")

  • base_url_biocache string: the base url for biocache web services (default="http://biocache.ala.org.au/ws/")

  • base_url_alaspatial string: the base url for older ALA spatial services (default="http://spatial.ala.org.au/alaspatial/ws/")

Value

For ala_config(), a list of all options. When ala_config(...) is called with arguments, nothing is returned but the configuration is set.

Author(s)

Atlas of Living Australia support@ala.org.au

References

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

http://spatial.ala.org.au/layers-service/ this will eventually move to the api link

Invoking ala_config() with no arguments returns a list with the current values of the options.

ala_reasons() returns a data frame with information describing the valid options for download_reason_id

Examples

ala_config()
ala_config(caching="off")
ala_reasons()
ala_config(download_reason_id=9,verbose=TRUE)
ala_config("reset")

[Package ALA4R version 1.01 Index]