Sqldf does not install on Ubuntu 14.04
I am trying to install sqldf package on Ubuntu 14.04 machine but I am getting the following error:
Warning in install.packages :
package ‘sqldf’ is not available (for R version 3.0.2)
I tried to install libpq-dev library as suggested by others . but I am still getting the message.
UPDATE
I am trying to upgrade R, but I get the following message:
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.
I tried solutions in this section but none worked
source to share
Take a look at the page:
Depends: R (≥ 3.1.0), gsubfn (≥ 0.6), proto, RSQLite (≥ 1.0.0)
As clearly stated in the error message, you are using an older R 3.0.2 which is less than the required 3.1.0.
The fix is easy: read the Ubuntu-specific README, make the correction to install (current !!) R files as .deb packages via apt-get
from CRAN - and you'll have R 3.1.2 in no time.
This will allow you to set the current sqldf as well.
source to share
I followed these instructions and it worked!
sudo add-apt-repository ppa:marutter/rrutter
sudo apt-get update
sudo apt-get install r-base r-base-dev
source to share
You can find this to fix this problem:
# 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
everyone will like it .. !!
source to share