Install udunits2 package for R3.3
I had the same problem. Following the first answer from here you have to install -dev
version of udunits
:
sudo apt-get install libudunits2-dev
Then the installation of udunits2
and ggforce
goes without any error.
EDIT:
Following the comments below, for CentOS7 it should be:
sudo yum install udunits2-devel
And for MacOS:
brew install udunits
How install R package udunits2 in Ubuntu
Seems like you are missing the package libudunits2
, which is required to install the R package udunits2
. Try installing that first with the following command:
sudo apt-get install libudunits2-dev
Hope this helps.
udunits2 R install: udunits2.h not found
On Fedora the header file is installed in /usr/include/udunits2
, c.f. this Github issue. Solution provided there:
sudo yum install udunits2-devel
Followed by:
install.packages("udunits2",configure.args='--with-udunits2-include=/usr/include/udunits2/')
Installing choroplethr in Ubuntu
For Ubuntu with R 3.5 you can use the c2d4u3.5 PPA made available by the same persons that bring you R Ubuntu packages on CRAN, c.f. https://cran.r-project.org/bin/linux/ubuntu/README.html and http://dirk.eddelbuettel.com/blog/2017/12/22/:
sudo add-apt-repository ppa:marutter/c2d4u3.5
sudo apt-get update
After that you can install binary packages for most CRAN packages:
sudo apt-get install r-cran-choroplethr
This should work for all packages that are mentioned in CRAN task views.
Besides this, I tried to reproduce your installation problems using docker:
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --yes --no-install-recommends gnupg ca-certificates \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 \
&& echo "deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install --yes --no-install-recommends r-base-dev libudunits2-dev \
&& Rscript -e 'install.packages(c("units", "udunits2"))'
However, the image was build without problems.
Related Topics
Can't Loop with R's Leaflet Package to Produce Multiple Maps
Gantt Style Time Line Plot (In Base R)
How to Resolve Spherical Geometry Failures When Joining Spatial Data
What Evaluates to True/False in R
Identify Duplicates and Mark First Occurrence and All Others
How to Use Cast or Another Function to Create a Binary Table in R
How to Subset a Matrix with Different Column Positions for Each Row
Importing a Big Xlsx File into R
Change the Position of the Strip Label in Ggplot from the Top to the Bottom
Group Data and Plot Multiple Lines
Adding Column If It Does Not Exist
How to Append a Whole Dataframe to a CSV in R
Replace Missing Values (Na) in One Data Set with Values from Another Where Columns Match