问题
I've been having a lot of trouble using the "fromJSON" command. I'm trying to collect instagram data using their API, and this command isn't working. I'm using R and I have both packages for converting JSON to R installed, but I keep getting the following error: Error: could not find function "fromJSON"
I use R Studio and R 3.2.2 for Windows 8 x64. I tried searching and couldn't find a solution. Any help would be appreciated.
回答1:
Installing the package alone doesn't suffice. You need to load the library too... Use library(rjson)
or library(RJSONIO)
or ... depending on which package you prefer, before calling any functions in it.
回答2:
If you just installed the package, try rjson::fromJSON() instead of just fromJSON()
来源:https://stackoverflow.com/questions/32810460/r-3-2-2-rjson-and-rjsonio-package-installed-but-error-using-fromjson