[R] installing package from source

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Oct 24 20:11:57 CEST 2013

On 24/10/2013 18:25, Marc Schwartz wrote:
> On Oct 24, 2013, at 11:38 AM, David Winsemius <dwinsemius at comcast.net> wrote:
>> On Oct 23, 2013, at 7:53 PM, Long Vo wrote:
>>> Hi R users,
>>> Currently I want to fit a FIGARCH model to a dataset. The only package that
>>> allow for it that I could find is fGarch. However it seems that the FIGARCH
>>> model class fitting of this package has been moved to Oxmetrics. I tried to
>>> install the old versions of it using 'tar.gz' files from CRAN archive
>>> http://cran.r-project.org/src/contrib/Archive/fGarch/
>>> <http://cran.r-project.org/src/contrib/Archive/fGarch/>   but not sure how
>>> it works. I tried
>>> install.packages("myfilepath\fGarch_260.71.tar.gz", repos = NULL,
>>> type="source")
>>> And received this error:
>>> Warning: invalid package './I:_R filesGarch_260.71.tar.gz'
>>> Error: ERROR: no packages specified
>>> Warning messages:
>>> 1: running command '"I:/01_RFI~1/INSTAL~1/R-30~1.1/bin/i386/R" CMD INSTALL
>>> -l "I:\01_R files\installment\R-3.0.1\library" "./I:_R files
>>> Garch_260.71.tar.gz"' had status 1
>>> 2: In install.packages("I:\001_R files\fGarch_260.71.tar.gz", repos = NULL,
>>> :
>>> installation of package ‘./I:_R filesGarch_260.71.tar.gz’ had non-zero
>>> exit status
>>> Any helps on this?
>> I've aways specified the package names and their locations separately in my call to install.packages, but I don't know if that is always needed. It also appears that you have no "/" separator between your path and the file name.
> Long is trying to install a rather old version of the source R package that contains FORTRAN code on Windows.
> Besides the immediate error in the way the path was constructed in the install.packages() call, using a single backslash, which needs to be escaped:
>    http://cran.r-project.org/bin/windows/base/rw-FAQ.html#R-can_0027t-find-my-file
> there are likely to be issues from trying to install an old version of the package on a newer version of R, perhaps the lack of the requisite development tools for compiling FORTRAN:
>    http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-install-packages-into-libraries-in-this-version_003f
> and other issues as well.
> Depending upon how far back you need to go in package versions, there may be pre-compiled Windows binaries (.zip files) available in directories here:
>    http://cran.r-project.org/bin/windows/contrib/

I don't think so: see NEWS



     • Packages need to be (re-)installed under this version (3.0.0) of

so only those under bin/windows/contrib/3.0 will work, and there is only 
one for each package.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list