Jose Brasil
2010-Sep-27 19:30 UTC
[R-sig-Debian] Howto compile chemometrics package from source
Dear friends, I'm confused about how to install packages from source. I just updated R in Lenny from http://cran.fiocruz.br/bin/linux/debian/ I included in sources.list: deb http://cran.fiocruz.br/bin/linux/debian lenny-cran/ deb-src http://cran.fiocruz.br/bin/linux/debian lenny-cran/ Then: apt-get update apt-get install r-base r-base-dev Then I downloaded the package chemometrics_0.8.tar.gz from http://cran.r-project.org/src/contrib/chemometrics_0.8.tar.gz After untar I copied the dir chemometrics to /usr/lib/R/library and tried install.package(chemometrics) from R prompt (as root): install.packages(chemometrics) Erro em install.packages(chemometrics) : objeto 'chemometrics' n?o encontrado Could anyone give any help? Thanks in advance, Jose
Douglas Bates
2010-Sep-27 20:15 UTC
[R-sig-Debian] Howto compile chemometrics package from source
On Mon, Sep 27, 2010 at 2:30 PM, Jose Brasil <c2o.pro.br at gmail.com> wrote:> Dear friends, > > I'm confused about how to install packages from source. > > I just updated R in Lenny from http://cran.fiocruz.br/bin/linux/debian/ > > I included in sources.list: > > deb http://cran.fiocruz.br/bin/linux/debian lenny-cran/ > deb-src ?http://cran.fiocruz.br/bin/linux/debian lenny-cran/ > > Then: > apt-get update > apt-get install r-base r-base-dev > > Then I downloaded the package chemometrics_0.8.tar.gz ?from > http://cran.r-project.org/src/contrib/chemometrics_0.8.tar.gz > > After untar I copied the dir chemometrics to /usr/lib/R/library and > tried install.package(chemometrics) from R prompt (as root):Don't copy the package to /usr/lib/R/library. In fact, you don't even need to untar it. Copy it to a convenient location, say /tmp then cd to that directory and run R CMD INSTALL chemometrics_0.8.tar.gz> install.packages(chemometrics) > Erro em install.packages(chemometrics) : > ?objeto 'chemometrics' n?o encontrado > > Could anyone give any help? > > Thanks in advance, > Jose > > _______________________________________________ > R-SIG-Debian mailing list > R-SIG-Debian at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-debian >
denis brion
2010-Sep-28 14:27 UTC
[R-sig-Debian] Re : Howto compile chemometrics package from source
Dear Jose Brasil D. Bates already gave you a response on how to install from sources; however, as chemometrics depends (at least on som, mvtnorm, mclust, pls, robustbase, e1071, pcaPP, pls, lars) on other packages, you should have them already installed, either binary or from sources before trying to install chemometrics (else, "R CMD INSTALL" will complain and give the list of what is missing): R CMD INSTALL e1071_1.5-24.tar.gz R CMD INSTALL lars_0.9-7.tar.gz ( then, pcaPP_1.8-2.tar.gz, som_0.3.5.tar.gz, etc..) The main drawback of this way of installing from sources is that you must manage by yourself dependencies, and upgrade by yourself, even for complicated packages.... BTW : you might have little isues if you install packages in /usr/lib/R, as you might mess the packages you had compiled with the packages your package manager automatically manages... Adding "export R_LIBS=/usr/local/lib/R/library" (or any name of a directory you can write on) before installing from source and before invoking the libraries might be useful. Have nice days D.Brion --- En date de?: Lun 27.9.10, Jose Brasil <c2o.pro.br at gmail.com> a ?crit?:> De: Jose Brasil <c2o.pro.br at gmail.com> > Objet: [R-sig-Debian] Howto compile chemometrics package from source > ?: r-sig-debian at r-project.org > Date: Lundi 27 septembre 2010, 21h30 > Dear friends, > > I'm confused about how to install packages from source. > > I just updated R in Lenny from http://cran.fiocruz.br/bin/linux/debian/ > > I included in sources.list: > > deb http://cran.fiocruz.br/bin/linux/debian > lenny-cran/ > deb-src? http://cran.fiocruz.br/bin/linux/debian lenny-cran/ > > Then: > apt-get update > apt-get install r-base r-base-dev > > Then I downloaded the package chemometrics_0.8.tar.gz? > from > http://cran.r-project.org/src/contrib/chemometrics_0.8.tar.gz > > After untar I copied the dir chemometrics to > /usr/lib/R/library and > tried install.package(chemometrics) from R prompt (as > root): > > install.packages(chemometrics) > Erro em install.packages(chemometrics) : > ? objeto 'chemometrics' n?o encontrado > > Could anyone give any help? > > Thanks in advance, > Jose > > _______________________________________________ > R-SIG-Debian mailing list > R-SIG-Debian at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-debian >
Johannes Ranke
2010-Sep-28 18:04 UTC
[R-sig-Debian] Howto compile chemometrics package from source
Dear Jose, First of all let me explain why your first approach did not work:> install.packages(chemometrics) > Erro em install.packages(chemometrics) : > objeto 'chemometrics' n?o encontradoR does not know an object named "chemometrics" and therefore complains. You should have typed> install.packages("chemometrics")Note the quotes around the name of the package. I just tried this in my Ubuntu machine and it worked as expected without the need of manually downloading anything. Of course the r-base-dev package needs to be installed as you already know. Kind regards, Johannes