knitr::opts_chunk$set( warning = FALSE, message = FALSE, collapse = TRUE, comment = "#>" )
rbhl
is an R interface to the Biodiversity Heritage Library API.
Authentication:
BHL_KEY
, or your .Rprofile file with the name bhl_key
, and we'll use your API key without you having to enter it every time you run a search.Documentation:
Stable version
install.packages("rbhl")
Development version
remotes::install_github("ropensci/rbhl")
library("rbhl")
You can output various formats using the as
parameter, setting to table
, list
, json
or xml
.
The default is usually table
:
bhl_authorsearch(name='dimmock')
list output
bhl_authorsearch(name='dimmock', as='list')$Result[[1]]
XML output
bhl_authorsearch(name='dimmock', as='xml')
JSON output
bhl_authorsearch(name='dimmock', as='json')
bhl_gettitlemetadata(1726, items = TRUE, as = "list")$Result[[1]]$Items
bhl_publicationsearch('cocos island costa rica birds')
bhl_getlanguages()
rbhl
in R doing citation(package = 'rbhl')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.