I am trying to build a cartogram with R following the algorithm of Gastner & Newman on diffusion-based methods for producing density-equalizing maps
I have found a recipe on how to do it with help of the Getcartr
and Rcartogram
packages; however, this requires installation of the Fast Fourier Transform libraries FFTW3
and fftw
.
I installed fftw
easily from CRAN, but I have a problem with FFTW3
, which I could only find as an archived file here.
I get the following error message when trying to install the package from a .zip file:
install.packages(choose.files(), type="source", repos=NULL)
Installing package into ‘H:/R.shiny.tutorial/libraries’ (as
lib
is unspecified)Warning in
read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type"))
: cannot open compressed file 'fftw-3.3.4/DESCRIPTION', probable reason 'No such file or directory'Error in
read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type"))
: cannot open the connectionWarning in
install.packages
: running command '"Q:/RSTUD301.001/R-32~1.0/bin/i386/R" CMD INSTALL -l "H:\R.shiny.tutorial\libraries" "F:/cartogram/fftw-3.3.4.zip"' had status 1 Warning ininstall.packages
: installation of package ‘F:/cartogram/fftw-3.3.4.zip’ had non-zero exit status
I found some tips on installing FFTW3
on Mac and Linux, but I work on a Windows machine.
I found similar problems online but their solutions do not work for me.
Here is my session.info()
:
R version 3.2.0 (2015-04-16)
Platform: **i386-w64-mingw32/i386 (32-bit)**
Running under: **Windows 7 x64 (build 7601) Service Pack 1**
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.2.0
Can you help?