问题
I am trying to install the fftw3 package through R console
>install.packages("fftw")
After this command it is asking to select the cran mirror.I have selected the cran mirror then following error occurs:
Loading Tcl/Tk interface ... done
Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/src/contrib
Warning messages:
1: In open.connection(con, "r") :
unable to connect to 'cran.r-project.org' on port 80.
2: In getDependencies(pkgs, dependencies, available, lib) :
package ‘fftw’ is not available (for R version 2.14.1)
And When I am trying for fftw3 then following error occurs:
> install.packages("fftw3")
Installing package(s) into ‘/root/R/x86_64-pc-linux-gnu-library/2.14’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/src/contrib
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘fftw3’ is not available (for R version 2.14.1)
Can anyone help me out of this?
回答1:
As Paul said, that's probably not an R package. There is an R package that is a wrapper for the FFTW library, also called fftw, you should install that:
Link to CRAN page of fftw
In Ubuntu you have then still the system requirement to have a proper installed fftw library, that you probably can solve via
sudo apt-get install fftw3 fftw3-dev pkg-config
回答2:
The website you linked talks about a C library, there is nothing about an R code package. You mistakenly assume that R can install any .tar.gz file as an R library. An R library has a very specific structure of files and directories, and the error you get is because the .tar.gz does not adhere to this structure.
来源:https://stackoverflow.com/questions/14850498/how-to-install-the-fftw3-package-of-r-in-ubuntu-12-04