R语言安装sqldb包报错解决办法
2017-02-09 00:04
337 查看
我使用Rtudio环境,安装sqldb几次出错。网上没有好的教程。
经过自己试验之后,这样处理。我写出来以后,供大家参考。
解决办法:
1.彻底退出你的360。
2.在RStudio里设置在某个镜像站下载包的
在Rtudio中菜单栏点击tool>global option>packages>change
选择China (Beijing) [https] - TUNA Team, Tsinghua University
然后就可以安装出来了。
输入library(sqldf)
我们看到又出错了。
我们检查一下tcltk
此时我们使用SQL语句,就可以操作了
经过自己试验之后,这样处理。我写出来以后,供大家参考。
> install.packages("sqldf") also installing the dependencies ‘BH’, ‘plogr’, ‘gsubfn’, ‘proto’, ‘RSQLite’, ‘DBI’, ‘chron’ trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/BH_1.62.0-1.zip' Content type 'application/zip' length 16150075 bytes (15.4 MB) downloaded 3.8 MB ... Warning in install.packages : error 1 in extracting from zip file Warning in install.packages : cannot open compressed file 'BH/DESCRIPTION', probable reason 'No such file or directory' Error in install.packages : cannot open the connection
解决办法:
1.彻底退出你的360。
2.在RStudio里设置在某个镜像站下载包的
在Rtudio中菜单栏点击tool>global option>packages>change
选择China (Beijing) [https] - TUNA Team, Tsinghua University
然后就可以安装出来了。
> install.packages("sqldf") also installing the dependencies ‘BH’, ‘plogr’, ‘gsubfn’, ‘proto’, ‘RSQLite’, ‘DBI’, ‘chron’ ... The downloaded binary packages are in C:\Users\yichenfan\AppData\Local\Temp\RtmpOO6hO7\downloaded_packages
输入library(sqldf)
> library(sqldf) 载入需要的程辑包:gsubfn 载入需要的程辑包:proto 载入需要的程辑包:RSQLite > newdf<-sqldf("select * from mtcars where carb=1 order by mpg",row.names=TRUE) Loading required package: tcltk Warning message: Quoted identifiers should have class SQL, use DBI::SQL() if the caller performs the quoting.
我们看到又出错了。
我们检查一下tcltk
> capabilities()["tcltk"] tcltk TRUE
此时我们使用SQL语句,就可以操作了
> library(sqldf) > newdf<-sqldf("select * from mtcars where carb=1 order by mpg",row.names=TRUE) > newdf mpg cyl disp hp drat wt qsec vs am gear carb Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1 Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1 Toyota Corona 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1 Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1 Fiat 128 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1 Toyota Corolla 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1
相关文章推荐
- R语言安装sqldb包报错解决办法
- R语言package无法安装的解决办法
- R语言安装openxl包报错解决办法
- R语言安装openxl包报错解决办法
- R语言系列:rgl包安装出错的解决办法
- Preferences无法显示新安装的插件的解决办法
- Redhat as 3.0下安装php5出错及解决办法
- Eclipse不认安装后的插件解决办法
- 用vsFTPd自架Linux网络安装服务器,以及Redhat局域网安装的解决办法
- Eclipse 3.0 安装插件时不能成功安装的解决办法
- 安装.NET2.0后运行出现Failed to access IIS metabase错误解决办法.
- 图解安装simsun字体后OO乱码的摸黑解决办法【转贴自http://linux.hiweed.com】
- .NET Framework 1.1安装出现1935错误的解决办法
- oracle安装后引起的Eclipse使用错误解决办法
- SQL CE 2.0 Server Tools安装失败解决办法
- asp2.0 中不安装sqlexpress 的解决办法
- appfuse1.8.0安装app_user.enabled data type (1111, ‘bit’) not recognized and will be ignored错误解决办法
- 在redhat 9 上安装oracle 9.2.0.4 时,DBCA 出错的解决办法
- FreeBSD用ports安装Firefox不成功 + 解决办法!
- 关于:以前的某个程序安装已在安装计算机上创建挂起的文件操作 解决办法