How to install the fftw3 package of R in ubuntu 12.04?
Asked Answered
P

2

10

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?

Period answered 13/2, 2013 at 9:43 Comment(0)
S
28

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
Squinteyed answered 13/2, 2013 at 10:21 Comment(5)
@Daniel.. Thanks For your response.I have already tried like what you have mentioned.Can you please me about the system requirement fftw3 (>= 3.1.2) to the Link to CRAN page of fftw . How I can achieve that...Period
I think first you have to type the apt-get command into the console (that has nothing to do with R it is on the OS level) and then, after the OS has the libraries installed you can install the R package as you tried, maybe you could try another Cran mirror.Squinteyed
@Daniel I did as per your suggestion and installation shows that it was successful but still not working for me.when I am typing the command >library(fftw) then the error is: fftw package not found.Is any other thing I need to do? In fact in R console I also tried install.packages("fftw3") the error was like:Installing package(s) into ‘/root/R/x86_64-pc-linux-gnu-library/2.14’ (as ‘lib’ is unspecified) Warning message: In getDependencies(pkgs, dependencies, available, lib) : package ‘fftw3’ is not available (for R version 2.14.1)Period
@Daniel...when I am trying >install.packages("fftw") then following error occurs:No package 'fftw3' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FFTW_CFLAGS and FFTW_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. ERROR: configuration failed for package ‘fftw’ * removing ‘/root/R/x86_64-pc-linux-gnu-library/2.14/fftw’ Warning message: In install.packages("fftw") : installation of package ‘fftw’ had non-zero exit statusPeriod
Have you installed the pkg-config tool for Ubuntu? I think the R package makes use of it (and btw, I forgot to add the dev version of fftw3 in apt-get), so if you install those two things also before installing the R package it should work out (I'll edit my answer accordingly...)Squinteyed
C
-1

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.

Carafe answered 13/2, 2013 at 10:1 Comment(3)
Thanks for Your response.... but I have also tried to do that like : install.packages("fftw") but still its not working for me.This command asking to select the mirror.I have selected the mirror alsoPeriod
Please edit your question with this new information, including the errors you get.Carafe
@Paul.. As per your suggestion I have made the modification in my question hope Its clear now...Period

© 2022 - 2024 — McMap. All rights reserved.