R Rstudio problems installing the mapdeck package and googlePolylines

1

When I try to install the mapdeck package in Rstudio, it tells me that I need the googlePolylines package, but I can not install the latter. The error that comes up is the following:

  

package 'googlePolylines' successfully unpacked and MD5 sums checked

     

libs

     

g ++ -m64 -std = gnu ++ 0x -I / usr / include / R -DNDEBUG -I ../ inst / include   -I "/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include" -I "/ usr / lib64 / R / library / BH / include" -I / usr / local / include -fpic -O2 -g -pipe -Wall -Wp, -D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector --param = ssp-buffer-size = 4 -m64 -mtune = generic -c RcppExports.cpp -o RcppExports.o

     

g ++ -m64 -std = gnu ++ 0x -I / usr / include / R -DNDEBUG -I ../ inst / include   -I "/home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include" -I "/ usr / lib64 / R / library / BH / include" -I / usr / local / include -fpic -O2 -g -pipe -Wall -Wp, -D_FORTIFY_SOURCE = 2 -fexceptions -fstack-protector --param = ssp-buffer-size = 4 -m64 -mtune = generic -c encode.cpp -o encode.o

     

encode.cpp: In function 'void encode_vector (std :: ostringstream &,   std :: ostringstream &, Rcpp :: List, Rcpp :: CharacterVector & amp, int) ':   encode.cpp: 175: error: conversion from   'Rcpp :: internal :: generic_proxy < 19, Rcpp :: PreserveStorage >' to 'double'   is ambiguous   /home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:73:   note: candidates are: Rcpp :: internal :: generic_proxy :: operator int () const [with int RTYPE = 19,   StoragePolicy = Rcpp :: PreserveStorage]   /home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:72:   note: Rcpp :: internal :: generic_proxy :: operator bool () const [with int RTYPE = 19,   StoragePolicy = Rcpp :: PreserveStorage]   /home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:67:   note: Rcpp :: internal :: generic_proxy :: operator U () const [with U = double, int RTYPE = 19,   StoragePolicy = Rcpp :: PreserveStorage] encode.cpp: 176: error:   conversion from 'Rcpp :: internal :: generic_proxy < 19   Rcpp :: PreserveStorage > 'to' double 'is ambiguous   /home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:73:   note: candidates are: Rcpp :: internal :: generic_proxy :: operator int () const [with int RTYPE = 19,   StoragePolicy = Rcpp :: PreserveStorage]   /home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:72:   note: Rcpp :: internal :: generic_proxy :: operator bool () const [with int RTYPE = 19,   StoragePolicy = Rcpp :: PreserveStorage]   /home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/Rcpp/include/Rcpp/vector/generic_proxy.h:67:   note: Rcpp :: internal :: generic_proxy :: operator U () const [with U = double, int RTYPE = 19,   StoragePolicy = Rcpp :: PreserveStorage] make: *** [encode.o] Error 1   ERROR: compilation failed for package 'googlePolylines'

     

removing   '/Home/arubio/R/x86_64-redhat-linux-gnu-library/3.4/googlePolylines'

     

Warning in install.packages: installation of package   'GooglePolylines' had non-zero exit status

     

The downloaded source packages are in     '/ Tmp / RtmpwwAJSv / downloaded_packages'

I have not found almost any information about these packages, I would appreciate it if someone could help me, thanks.

    
asked by Ana 20.11.2018 в 09:21
source

1 answer

1

Some basic libraries for handling polygons and cartography at the operating system level may be missing.

Installation of libraries for R cartography with Fedora28

In order to install sp and gdal (necessary to import layers of polygons) you have to install a series of libraries directly in linux.

From the system terminal you should use the following commands:

sudo dnf install geos geos-devel
sudo dnf install gdal gdal-devel 
sudo dnf install proj-devel
sudo dnf install proj-nad
sudo dnf install proj-epsg

Since you are using sudo , you are going to ask for the password. Those packages are in the official Fedora repository, so there should not be any problems.

After installing those libraries at the system level, you could install sp and gdal from CRAN. Then googlePolylines .

You tell us how it went.

Greetings!

    
answered by 22.11.2018 / 17:15
source