我的代码:
install.packages(
'recharts',
repos = c('http://yihui.name/xran', 'http://cran.rstudio.com')
)
library(recharts)
echart(iris, ~Sepal.Length, ~Sepal.Width, series = ~Species)
错误是:
错误:无法找到功能" echart"
答案 0 :(得分:2)
显然,echart
包中没有recharts
功能,当你安装它时:
install.packages('recharts', repos = c('http://yihui.name/xran', 'http://cran.rstudio.com'))
这将安装0.0.1
recharts
library(recharts)
echart(iris, ~Sepal.Length, ~Sepal.Width, series = ~Species)
Error: could not find function "echart"
但是,如果你安装相同的包:
devtools::install_github("yihui/recharts")
这将安装0.0.3
recharts
library(recharts)
echart(iris, ~Sepal.Length, ~Sepal.Width, series = ~Species)
它有效