Here are a list of the necessary packages for this assignment:
library(RCurl)
library(jsonlite)
library(DT)For this assignment, I went ahead and retrieved some information about critics and displayed as a datatable. I am getting a weird warning every time I open in a web browser or compile. I have not been able to get rid of it.
nyt_url <- "https://api.nytimes.com/svc/movies/v2/critics/all.json"
nyt_api <- "2clgLwkWHqtVThCH1xNtVQD906tFnVmg"
nyt_url_comp <- paste0(nyt_url,"?api-key=",nyt_api)
critics <- data.frame(fromJSON(nyt_url_comp),flatten=TRUE)
datatable(critics)