I am new to R. I installed R with apt-get on ubuntu. I want to run a R script locally that connects to DB using RJDBC.
I am trying to install RJDBC package. I installed it with following steps
R> install.packages("RJDBC")
It asked if I want to create personal directory I entered yes.
Now when I try library(RJDBC)
in R script it gives me an error no such package found.
I am not installing RStudio. I want to simply create R script and run it with Rscript command. I installed Rscript for the same reason.
Am I missing something?
I'm using Ubuntu instance. Any help is greatly appreciated.
install.packages("/tmp/RtmpRgKgmc/downloaded_packages/txtplot_1.0-3.tar.gz", repos= NULL , type = "source")
Installing package into ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
> library('txtplot')
Error in library("txtplot") : there is no package called ‘txtplot’
>
UPDATE:
I have been trying it for hours now. But its not installing any package. I am on Ubuntu 14.04 and after installation it is installing R 3.0.2 version.
I ran below on R console. But it never installs it. Just downloads packages into temp folder.
trying URL 'http://cran.cnr.berkeley.edu/src/contrib/plumber_0.4.6.tar.gz'
Content type 'application/x-gzip' length 83174 bytes (81 Kb)
opened URL
==================================================
downloaded 81 Kb
The downloaded source packages are in
‘/tmp/RtmppYMbcW/downloaded_packages’
What Do I do next?
I followed installation steps from here. https://medium.com/@GalarnykMichael/install-r-and-rstudio-on-ubuntu-12-04-14-04-16-04-b6b3107f7779