0

I am using API to get some data from Flickr. I have downloaded packages: RJSONIO,RCurl and library them successfully. This is what I tried:

parsedData <- fromJSON(rawData) Error in file(con, "r") : cannot open the connection

I am using Rstudio, and I have tried this method: More->Set As Working Dictionary

setwd("~/Desktop/Big data/1234")

What should I do next?

Nakx
  • 1,460
  • 1
  • 23
  • 32
Shirley zou
  • 31
  • 1
  • 3
  • What's inside the `rawData` variable? When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Feb 11 '20 at 02:45
  • inside the rawData is the getURL function. theURL <- paste0("the URL", "method=flickr.photos.search", "&api_key=xxxxxx", "&text=xxxxx", "&min_taken_date=2012-10-29 00:00:00", "&max_taken_date=2012-11-01 23:59:59", "&format=json&nojsoncallback=1") theURL <- URLencode(theURL) rawData <- getURL(theURL) parsedData <- fromJSON(rawData) – Shirley zou Feb 11 '20 at 11:07

0 Answers0