Session Ready
Exercise

From JSON to R

The two most important function in the jsonlite package are fromJSON() and toJSON(). Let's start with fromJSON() first. As you've seen in the video, this function can take character strings that represent JSON data. It also works if you pass a URL as a character string or the path to a local file that contains JSON data.

Instructions
100 XP
  • Load the jsonlite package. It's already installed on DataCamp's servers.
  • wine_json represents a JSON. Use fromJSON() to convert it to a list, named wine.
  • Quandl provides an API to get financial and economical data. quandl_url represents a URL. Use fromJSON() directly on this URL and store the result in quandl_data.
  • Display the structure of both wine as quandl_data.