Skip to content

Installing sjPlot in R 3.4.4 on Ubuntu 16.04LTS

3 messages · Brandon C. Zicha, Dirk Eddelbuettel

#
Dear all,

I have had some rather serious difficulties getting graphics and analysis
packages to load in R on my new Ubuntu Install.

The trouble seems to begin when attempting to install TMB.

I have done a full purge of r-base r-base-dev and r-base-core and
reinstalled the newest version of RStudio (not that this should matter).
I'm not sure what to try next.

many thanks!

Brandon Z
(as ?lib? is unspecified)also installing the dependencies ?TMB?,
?blme?, ?arm?, ?effects?, ?ggeffects?, ?glmmTMB?, ?lme4?, ?merTools?,
?sjstats?
trying URL 'https://cloud.r-project.org/src/contrib/TMB_1.7.14.tar.gz'Content
type 'application/x-gzip' length 606414 bytes (592
KB)==================================================downloaded 592 KB
trying URL 'https://cloud.r-project.org/src/contrib/blme_1.0-4.tar.gz'Content
type 'application/x-gzip' length 35054 bytes (34
KB)==================================================downloaded 34 KB
trying URL 'https://cloud.r-project.org/src/contrib/arm_1.10-1.tar.gz'Content
type 'application/x-gzip' length 78301 bytes (76
KB)==================================================downloaded 76 KB
trying URL 'https://cloud.r-project.org/src/contrib/effects_4.0-2.tar.gz'Content
type 'application/x-gzip' length 2021373 bytes (1.9
MB)==================================================downloaded 1.9 MB
trying URL 'https://cloud.r-project.org/src/contrib/ggeffects_0.3.4.tar.gz'Content
type 'application/x-gzip' length 239215 bytes (233
KB)==================================================downloaded 233 KB
trying URL 'https://cloud.r-project.org/src/contrib/glmmTMB_0.2.1.0.tar.gz'Content
type 'application/x-gzip' length 783833 bytes (765
KB)==================================================downloaded 765 KB
trying URL 'https://cloud.r-project.org/src/contrib/lme4_1.1-17.tar.gz'Content
type 'application/x-gzip' length 4103343 bytes (3.9
MB)==================================================downloaded 3.9 MB
trying URL 'https://cloud.r-project.org/src/contrib/merTools_0.4.1.tar.gz'Content
type 'application/x-gzip' length 476671 bytes (465
KB)==================================================downloaded 465 KB
trying URL 'https://cloud.r-project.org/src/contrib/sjstats_0.15.0.tar.gz'Content
type 'application/x-gzip' length 339472 bytes (331
KB)==================================================downloaded 331 KB
trying URL 'https://cloud.r-project.org/src/contrib/sjPlot_2.4.1.tar.gz'Content
type 'application/x-gzip' length 776902 bytes (758
KB)==================================================downloaded 758 KB
* installing *source* package ?TMB? ...** package ?TMB? successfully
unpacked and MD5 sums checked** libsgcc -std=gnu99
-I/usr/share/R/include -DNDEBUG  -I"/usr/lib/R/library/Matrix/include"
-I"/home/drz/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c
external_metis.c -o external_metis.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
-I"/usr/lib/R/library/Matrix/include"
-I"/home/drz/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c init.c
-o init.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
-I"/usr/lib/R/library/Matrix/include"
-I"/home/drz/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c
local_stubs.c -o local_stubs.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
-I"/usr/lib/R/library/Matrix/include"
-I"/home/drz/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c
solve_subset.c -o solve_subset.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG
-I"/usr/lib/R/library/Matrix/include"
-I"/home/drz/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c utils.c
-o utils.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o
TMB.so external_metis.o init.o local_stubs.o solve_subset.o utils.o
-llapack -lblas -lgfortran -lm -lquadmath -fopenmp -L/usr/lib/R/lib
-lRinstalling to
/home/drz/R/x86_64-pc-linux-gnu-library/3.4/TMB/libs** R** inst**
preparing package for lazy loading** help*** installing help indices**
building package indices** testing if installed package can be
loadedBuilding example simple
g++  -I/usr/share/R/include -DNDEBUG
-I/home/drz/R/x86_64-pc-linux-gnu-library/3.4/TMB/include -I
-DTMB_SAFEBOUNDS -DLIB_UNLOAD=R_unload_simple
-DTMB_LIB_INIT=R_init_simple  -I"/usr/lib/R/library/Matrix/include"
-I"/home/drz/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-fpic  -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c
simple.cpp -o simple.o
In file included from simple.cpp:2:0:
/home/drz/R/x86_64-pc-linux-gnu-library/3.4/TMB/include/TMB.hpp:53:23:
fatal error: Eigen/Dense: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:168: recipe for target 'simple.o' failed
make: *** [simple.o] Error 1
Timing stopped at: 0.028 0.004 0.044
Error: package or namespace load failed for ?TMB?:
 .onAttach failed in attachNamespace() for 'TMB', details:
  call: compile(paste0(name, ".cpp"), ...)
  error: Compilation failed
Error: loading failed
Execution haltedERROR: loading failed* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/TMB?Warning in
install.packages :
  installation of package ?TMB? had non-zero exit status* installing
*source* package ?lme4? ...** package ?lme4? successfully unpacked and
MD5 sums checked** libsg++  -I/usr/share/R/include -DNDEBUG
-I"/home/drz/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include"
-I"/home/drz/R/x86_64-pc-linux-gnu-library/3.4/RcppEigen/include"
-DNDEBUG -DEIGEN_DONT_VECTORIZE -fpic  -g -O2 -fstack-protector-strong
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
-c external.cpp -o external.oIn file included from external.cpp:8:0:
predModule.h:12:23: fatal error: RcppEigen.h: No such file or directory
compilation terminated./usr/lib/R/etc/Makeconf:168: recipe for target
'external.o' failedmake: *** [external.o] Error 1ERROR: compilation
failed for package ?lme4?* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/lme4?Warning in
install.packages :
  installation of package ?lme4? had non-zero exit statusERROR:
dependency ?lme4? is not available for package ?blme?* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/blme?Warning in
install.packages :
  installation of package ?blme? had non-zero exit statusERROR:
dependency ?lme4? is not available for package ?arm?* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/arm?Warning in
install.packages :
  installation of package ?arm? had non-zero exit statusERROR:
dependency ?lme4? is not available for package ?effects?* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/effects?Warning in
install.packages :
  installation of package ?effects? had non-zero exit statusERROR:
dependencies ?TMB?, ?lme4? are not available for package ?glmmTMB?*
removing ?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/glmmTMB?Warning
in install.packages :
  installation of package ?glmmTMB? had non-zero exit statusERROR:
dependencies ?arm?, ?lme4?, ?blme? are not available for package
?merTools?* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/merTools?Warning in
install.packages :
  installation of package ?merTools? had non-zero exit statusERROR:
dependencies ?lme4?, ?glmmTMB? are not available for package
?sjstats?* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/sjstats?Warning in
install.packages :
  installation of package ?sjstats? had non-zero exit statusERROR:
dependencies ?effects?, ?sjstats? are not available for package
?ggeffects?* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/ggeffects?Warning in
install.packages :
  installation of package ?ggeffects? had non-zero exit statusERROR:
dependencies ?arm?, ?effects?, ?ggeffects?, ?glmmTMB?, ?lme4?,
?merTools?, ?sjstats? are not available for package ?sjPlot?* removing
?/home/drz/R/x86_64-pc-linux-gnu-library/3.4/sjPlot?Warning in
install.packages :
  installation of package ?sjPlot? had non-zero exit statusThe
downloaded source packages are in
	?/tmp/Rtmpe0EXSm/downloaded_packages?
#
I see a plain package error:

   In file included from simple.cpp:2:0:
   /home/drz/R/x86_64-pc-linux-gnu-library/3.4/TMB/include/TMB.hpp:53:23:
   fatal error: Eigen/Dense: No such file or directory
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   compilation terminated.
   /usr/lib/R/etc/Makeconf:168: recipe for target 'simple.o' failed
   make: *** [simple.o] Error 1

Maybe talk to the TMB maintainer?

The good news is that you can TMB (and more) pre-built from Michael's PPA.
Here I launch a quick docker container I have with his PPA pre-set:

edd at rob:~$ docker run --rm -ti rocker/r-apt:trusty bash
root at 7f81af56c277:/# apt-get update 2>&1 > /dev/null
W: Size of file /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-amd64_Packages.gz is not what the server reported 4718 4727
root at 7f81af56c277:/# apt-cache policy r-cran-sjplot
N: Unable to locate package r-cran-sjplot
root at 7f81af56c277:/# apt-cache policy r-cran-tmb
r-cran-tmb:
  Installed: (none)
  Candidate: 1.7.14-1cran1ppa0trusty0
  Version table:
     1.7.14-1cran1ppa0trusty0 0
        500 http://ppa.launchpad.net/marutter/c2d4u/ubuntu/ trusty/main amd64 Packages
root at 7f81af56c277:/# 

So version 1.7.14 of TMB is there.  I can install the first half of your list
from .deb packages:

   ?TMB?,?blme?, ?arm?, ?effects?,

but the remainder would come from source (apart from lme4)

   ?ggeffects?, ?glmmTMB?, ?lme4?, ?merTools?, ?sjstats?

and would pull quite a tail of other packages so I did not proceed. 

Dirk
#
On 1 July 2018 at 11:42, Brandon C. Zicha wrote:
| I have had some rather serious difficulties getting graphics and analysis
| packages to load in R on my new Ubuntu Install.
| 
| The trouble seems to begin when attempting to install TMB.

You should debug TMB installation at your end. It works everywhere else,
including on CRAN.

Dirk