我试图在Ubuntu 14.04计算机上安装sqldf软件包,但是我收到以下错误:
Warning in install.packages :
package ‘sqldf’ is not available (for R version 3.0.2)
我尝试按照libpq-dev帖子的建议安装了库other,但我仍然收到了消息。
更新
我试图更新R,但我收到以下消息:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 3.1.2-1precise0) but it is not going to be installed
Depends: r-recommended (= 3.1.2-1precise0) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我尝试了解决方案in this topic,但没有一个工作
答案 0 :(得分:10)
查看package page:
Depends: R (≥ 3.1.0), gsubfn (≥ 0.6), proto, RSQLite (≥ 1.0.0)
正如错误消息明确指出的那样,您使用的旧版本R 3.0.2小于所需的3.1.0。
修复很简单:阅读Ubuntu-specific README,通过apt-get
从CRAN进行调整以安装(当前!!)R二进制文件为.deb包 - 你将拥有R 3.1.2马上。
允许您安装当前的sqldf。
答案 1 :(得分:3)
我跟着these instructions,一切正常!
sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install r-base r-base-dev
答案 2 :(得分:0)
您可以通过此尝试解决此问题:
# Install function for packages
packages<-function(x) {
x<-as.character(match.call()[[2]])
if (!require(x,character.only=TRUE)) {
install.packages(pkgs=x,repos="http://cran.r-project.org")
require(x,character.only=TRUE)
}
}
packages(ggplot2)
packages(reshape2)
packages(plyr)
# etc ...other packages
这一切都很享受.. !!