2

Please excuse the noobish nature of this post, but I have no idea how to install the R-package 'KFAS'. I have tried the command install.packages, but this brings about the following error message:

> install.packages("KFAS", type = "source")
trying URL 'http://cran.cnr.berkeley.edu/src/contrib/KFAS_0.9.11.tar.gz'
Content type 'application/x-gzip' length 71845 bytes (70 Kb)
opened URL
==================================================
downloaded 70 Kb

* installing *source* package ‘KFAS’ ...
** package ‘KFAS’ successfully unpacked and MD5 sums checked
** libs
gfortran-4.2 -arch x86_64  -fno-common -g -O2  -c  allsmooth.f95 -o allsmooth.o
make: gfortran-4.2: No such file or directory
make: *** [allsmooth.o] Error 1
ERROR: compilation failed for package ‘KFAS’
RMate stopped at line 0
* removing ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/KFAS’

The downloaded source packages are in
    ‘/private/var/folders/tm/fxjxlcfx0ld1rvd8dxztfnlh0000gn/T/RtmpZGPfzj/downloaded_packages’
Advarselsbesked:
In install.packages("KFAS", type = "source") :
  installation of package ‘KFAS’ had non-zero exit status
> 

Now I can see from this error message that there is some gfortran file or directory that the package-manager can't find. It does make sense that the package-manager looks for Fortran since "KFAS" package is coded in R and Fortran. But I just installed gfortran and this error message still comes up. I don't know what to do, to make this package install itself.

By the way, I am using a Macbook Air with OS X Lion. I don't know if this information helps. Please let me know if I need specify further information.

Thanks in advance

1 Answers1

3

Start with: make: gfortran-4.2: No such file or directory and install the Fortran compiler required to build this package.

There are a number of 'how do I compiled R packages under OS X' guides out on the web; you may find one that suits you.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725