knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The BacDive Web Service can be configured to reply either in JSON or XML. The former is used in the examples.
R's jsonlite seems to have replaced the older rjson.
We will request JSON from the BacDive Web service.
construct_url()
needs to append ?format=json
and jsonlite::fromJSON()
needs to be used for parsing replies.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.