cosname / recharts

An interface to ECharts
https://recharts.cosx.org
BSD 3-Clause "New" or "Revised" License
337 stars 149 forks source link

Error: could not find function "eMap" #36

Closed chaoshengt closed 7 years ago

chaoshengt commented 7 years ago

如题,安装之后,显示找不到eMap函数,这是怎么回事呢

Lchiffon commented 7 years ago

你确定是加载过recharts么?

library(recharts)
chaoshengt commented 7 years ago

@Lchiffon 肯定加载了~,是不是我没安装Echarts的原因~,菜鸟求教~~~ > library(recharts) Warning message: 程辑包‘recharts’是用R版本3.2.2 来建造的 > mapData <- data.frame(province=c("上海", "江苏", "广东", "黑龙江"), val1=c(100, 200, 300, 500), val2=c(200,300,400,200), val3=c(1,2,3,5), stringsAsFactors=F) > eMap(mapData, namevar=~province, datavar = ~val1+val2) Error: could not find function "eMap"

Lchiffon commented 7 years ago

贴下安装recharts的代码和sessionInfo()的结果吧

chaoshengt commented 7 years ago

使用教程中的安装方法提示不成功,我是把zip包下载下来,通过Tools工具安装的~~~ ‘devtools::install_github('taiyun/recharts') Downloading GitHub repo taiyun/recharts@master from URL https://api.github.com/repos/taiyun/recharts/zipball/master Installing recharts "C:/PROGRA~1/R/bin/x64/R" --no-site-file \ --no-environ --no-save --no-restore --quiet CMD \ INSTALL \ "C:/Users/tcs/AppData/Local/Temp/RtmpYhFkZu/devtools13c03a7e6c4e/taiyun-recharts-6a16a4c" \ --library="C:/Users/tcs/Documents/R/win-library/3.2" \ --install-tests

Error: Command failed (127)’

chaoshengt commented 7 years ago

sessionInfo() R version 3.2.0 (2015-04-16) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1

locale: [1] LC_COLLATE=Chinese (Simplified)_People's Republic of China.936 [2] LC_CTYPE=Chinese (Simplified)_People's Republic of China.936
[3] LC_MONETARY=Chinese (Simplified)_People's Republic of China.936 [4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_People's Republic of China.936

attached base packages: [1] stats graphics grDevices utils
[5] datasets methods base

loaded via a namespace (and not attached): [1] tools_3.2.0

chaoshengt commented 7 years ago

这几个命令也无法运行成功 : install_github('ramnathv/htmlwidgets') install_github('rstudio/htmltools') install_github('taiyun/recharts@htmlwidgets')

install_github('ramnathv/htmlwidgets') Downloading GitHub repo ramnathv/htmlwidgets@master from URL https://api.github.com/repos/ramnathv/htmlwidgets/zipball/master Installing htmlwidgets "C:/PROGRA~1/R/bin/x64/R" --no-site-file \ --no-environ --no-save --no-restore --quiet CMD \ INSTALL \ "C:/Users/tcs/AppData/Local/Temp/Rtmps1lkPb/devtools1fb440263806/ramnathv-htmlwidgets-3ce9f90" \ --library="C:/Users/tcs/Documents/R/win-library/3.2" \ --install-tests

Error: Command failed (127)

Lchiffon commented 7 years ago

试试把R升级到3.3.2再用devtools::install_github('taiyun/recharts')安装吧

这个安装目前没有太大的问题反而install_github('taiyun/recharts@htmlwidgets')是一个已经弃用很久的东东了

chaoshengt commented 7 years ago

昨天电脑崩溃,重装,正好安装3.3.2版本的R, 问题解决~~