[R] installing package from source

Marc Schwartz marc_schwartz at me.com
Thu Oct 24 19:25:37 CEST 2013

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:


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:


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:



Marc Schwartz

>> Regards,
>> Long

More information about the R-help mailing list