R: Get species habitats by taxon name, IUCN id, and region

rl_habitats {rredlist} | R Documentation

## Get species habitats by taxon name, IUCN id, and region

### Description

Get species habitats by taxon name, IUCN id, and region

### Usage

    rl_habitats(name = NULL, id = NULL, region = NULL, key = NULL,
      parse = TRUE, ...)

    rl_habitats_(name = NULL, id = NULL, region = NULL, key = NULL, ...)

    rl_history_(name = NULL, id = NULL, region = NULL, key = NULL, ...)

### Arguments

`name` | (character) A taxonomic name
`id` | (character) An IUCN identifier
`region` | (character) A region name, see `rl_regions` for acceptable region identifiers (use the entries in the `identifier` column)
`key` | A IUCN API token. See http://apiv3.iucnredlist.org/api/v3/token to get a token
`parse` | (logical) Whether to parse to list (`FALSE`) or data.frame (`TRUE`). Default: `TRUE`
`...` | Curl options passed to `HttpClient`

### Value

A list, with the data in the `result` slot, unless using a function with a trailing underscore, in which case json as character string is returned.

### References

API docs at http://apiv3.iucnredlist.org/api/v3/docs

### Examples

    ## Not run:
    rl_habitats('Fratercula arctica')
    rl_habitats('Fratercula arctica', region = 'europe')
    rl_habitats(id = 12392)
    rl_habitats(id = 22694927, region = 'europe')

    rl_habitats_('Fratercula arctica')
    rl_habitats_(id = 12392)

    ## End(Not run)

[Package rredlist version 0.4.0 Index]