R 3.2.2: “rjson” and “RJSONIO” package installed, but error using “fromJSON”

你。 提交于 2019-12-12 05:58:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!