Cannot install R packages on new Ubuntu Device - r

I am a medical doctor (so no computer science background at all) starting to get involved with bioinformatic analyses of big datasets and have used R on my private Windows laptop in the past without any problems.
My department now bought a new powerful Laptop to speed up the analyses and our bioinformatics core facility recommended using a Linux system (which I have never really used before), so now I have this great Ubuntu laptop but I'm getting a little frustrated with just setting up my R environment to start working. I've heard Linux needs some time to get used to and I'm up for the challenge and want to try to understand what I'm doing.
So the problem I have is that I cannot really install certain packages in R. As I said the laptop is brand new and installing R and RStudio was one of the first things I did without changing anything in the basic settings of the laptop. So I was very surprised that I keep getting errors in something as simple as installing those packages. For some reason some packages like
install.packages("tidyverse")
work fine, while others fail. So
install.packages("devtools")
gives me the following output
Installing package into ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘systemfonts’, ‘textshaping’, ‘ragg’, ‘pkgdown’
trying URL 'https://cloud.r-project.org/src/contrib/systemfonts_1.0.4.tar.gz'
Content type 'application/x-gzip' length 81757 bytes (79 KB)
==================================================
downloaded 79 KB
trying URL 'https://cloud.r-project.org/src/contrib/textshaping_0.3.6.tar.gz'
Content type 'application/x-gzip' length 35722 bytes (34 KB)
==================================================
downloaded 34 KB
trying URL 'https://cloud.r-project.org/src/contrib/ragg_1.2.4.tar.gz'
Content type 'application/x-gzip' length 427579 bytes (417 KB)
==================================================
downloaded 417 KB
trying URL 'https://cloud.r-project.org/src/contrib/pkgdown_2.0.7.tar.gz'
Content type 'application/x-gzip' length 871465 bytes (851 KB)
==================================================
downloaded 851 KB
trying URL 'https://cloud.r-project.org/src/contrib/devtools_2.4.5.tar.gz'
Content type 'application/x-gzip' length 374718 bytes (365 KB)
==================================================
downloaded 365 KB
* installing *source* package ‘systemfonts’ ...
** package ‘systemfonts’ successfully unpacked and MD5 sums checked
** using staged installation
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lfontconfig -lfreetype
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the fontconfig freetype2 library. Try installing:
* deb: libfontconfig1-dev (Debian, Ubuntu, etc)
* rpm: fontconfig-devel (Fedora, EPEL)
* csw: fontconfig_dev (Solaris)
* brew: freetype (OSX)
If fontconfig freetype2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a fontconfig freetype2.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: fontconfig/fontconfig.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘systemfonts’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/systemfonts’
Warning in install.packages :
installation of package ‘systemfonts’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘textshaping’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/textshaping’
Warning in install.packages :
installation of package ‘textshaping’ had non-zero exit status
ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘ragg’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/ragg’
Warning in install.packages :
installation of package ‘ragg’ had non-zero exit status
ERROR: dependency ‘ragg’ is not available for package ‘pkgdown’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/pkgdown’
Warning in install.packages :
installation of package ‘pkgdown’ had non-zero exit status
ERROR: dependency ‘pkgdown’ is not available for package ‘devtools’
* removing ‘/home/jasper/R/x86_64-pc-linux-gnu-library/4.2/devtools’
Warning in install.packages :
installation of package ‘devtools’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpZcPwU9/downloaded_packages’
After looking online for a couple of days now, I believe that there is a problem with the directories or access to them. When I enter
.libPaths()
in R, it gives me
[1] "/home/jasper/R/x86_64-pc-linux-gnu-library/4.2" "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library" "/usr/lib/R/library"
So I started looking into this and tried to modify R_LIBS_USER part of the Renviron file as described here (How do I change the default library path for R packages) without any success.
When I tried installing another package, I got the message that the path is not writable and I read this might be a permission problem. So I used used chmod -R 777 on the four directories (which as far as I understood gives me all permissions to these folders) that showed up with .libPaths(), but no success either. Repeated reinstallation of R and RStudio did not help either.
Unfortunately my computer science skills quickly find their limit (even working with the terminal to be honest). Since I honestly do not really understand what I am doing and would like to do so while changing files in the root of this new laptop, I am hoping that you can help me out. Quitting and changing back to Windows is not an option for my ego :D .
Here is my sessionInfo():
R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.2 fastmap_1.1.0 cli_3.4.1 htmltools_0.5.4 tools_4.2.2 rstudioapi_0.14 yaml_2.3.6 rmarkdown_2.19
[9] knitr_1.41 xfun_0.35 digest_0.6.31 rlang_1.0.6 evaluate_0.19
I would really appreciate your help!
Thanks a lot,
Jasper

I had this same problem recently when trying to install devtools on a kali linux virtual box.
The way I got around it was to install dev tool directly from the linux command line (terminal) using:
sudo apt-get install r-cran-devtools
This should work on Ubuntu too. Good luck.

Related

Having trouble installing certain packages for R

I'm having trouble installing certain packages for R. I have now found this issue with jtools, sjplot, and sjmisc. What is strange about it is that it isn't with all packages, ggplot2 was installed fine as well as the devtools package.
I pasted the output below for trying to install sjplot.
This may just be a coincidence and a may be reading some of it wrong because I'm not very experienced with R, but the thing in common with those that dont work compared to those that don't is that they seem to be .tar.gz instead of .zip.
I see this both in the middle of this log and in the Temp\Rtmps96tec\downloaded_packages folder it spits out at the end. The folder shows previous package downloads and all the ones before these that I am trying now that I am having trouble with have been .zip's
Then in the log it looks like it looks for .zips and its fine, then it looks for .tar.gzs and after those is where the issue that keeps coming up happens, the
"'E:\Program' is not recognized as an internal or external command,
operable program or batch file."
message. After that it doesn't look likr it does anything else successfully besides spit out the file int eh temp folder.
I'd love to be able to get it to work through R, but if there is a way to install manually since I have the .tar.gz downloaded and can just move the files over, but just moving the files that trying to reference library(sjplot) doesn't seem to work. I also tried installing with that tarball instead of the Repository but that didn't work either.
> install.packages("sjPlot")
also installing the dependencies ‘httpuv’, ‘later’, ‘prediction’, ‘shiny’, ‘emmeans’, ‘effects’, ‘ggeffects’, ‘merTools’, ‘modelr’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’
There are binary versions available but the source versions are later:
binary source needs_compilation
httpuv 1.4.1 1.4.4.1 TRUE
later 0.7.1 0.7.3 TRUE
prediction 0.3.2 0.3.6 FALSE
shiny 1.0.5 1.1.0 FALSE
emmeans 1.1.3 1.2.1 FALSE
effects 4.0-1 4.0-2 FALSE
ggeffects 0.3.2 0.3.4 FALSE
merTools 0.3.0 0.4.1 FALSE
modelr 0.1.1 0.1.2 FALSE
sjlabelled 1.0.8 1.0.11 FALSE
sjmisc 2.7.1 2.7.3 FALSE
sjstats 0.14.2-3 0.15.0 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/httpuv_1.4.1.zip'
Content type 'application/zip' length 1118480 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/later_0.7.1.zip'
Content type 'application/zip' length 605749 bytes (591 KB)
downloaded 591 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sjPlot_2.4.1.zip'
Content type 'application/zip' length 1054285 bytes (1.0 MB)
downloaded 1.0 MB
package ‘httpuv’ successfully unpacked and MD5 sums checked
package ‘later’ successfully unpacked and MD5 sums checked
package ‘sjPlot’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
installing the source packages ‘prediction’, ‘shiny’, ‘emmeans’, ‘effects’, ‘ggeffects’, ‘merTools’, ‘modelr’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’
trying URL 'https://cran.rstudio.com/src/contrib/prediction_0.3.6.tar.gz'
Content type 'application/x-gzip' length 34409 bytes (33 KB)
downloaded 33 KB
trying URL 'https://cran.rstudio.com/src/contrib/shiny_1.1.0.tar.gz'
Content type 'application/x-gzip' length 2350156 bytes (2.2 MB)
downloaded 2.2 MB
trying URL 'https://cran.rstudio.com/src/contrib/emmeans_1.2.1.tar.gz'
Content type 'application/x-gzip' length 571200 bytes (557 KB)
downloaded 557 KB
trying URL 'https://cran.rstudio.com/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://cran.rstudio.com/src/contrib/ggeffects_0.3.4.tar.gz'
Content type 'application/x-gzip' length 239215 bytes (233 KB)
downloaded 233 KB
trying URL 'https://cran.rstudio.com/src/contrib/merTools_0.4.1.tar.gz'
Content type 'application/x-gzip' length 476671 bytes (465 KB)
downloaded 465 KB
trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.2.tar.gz'
Content type 'application/x-gzip' length 118432 bytes (115 KB)
downloaded 115 KB
trying URL 'https://cran.rstudio.com/src/contrib/sjlabelled_1.0.11.tar.gz'
Content type 'application/x-gzip' length 131062 bytes (127 KB)
downloaded 127 KB
trying URL 'https://cran.rstudio.com/src/contrib/sjmisc_2.7.3.tar.gz'
Content type 'application/x-gzip' length 187915 bytes (183 KB)
downloaded 183 KB
trying URL 'https://cran.rstudio.com/src/contrib/sjstats_0.15.0.tar.gz'
Content type 'application/x-gzip' length 339472 bytes (331 KB)
downloaded 331 KB
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/prediction_0.3.6.tar.gz' had status 1
Warning in install.packages :
installation of package ‘prediction’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/shiny_1.1.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘shiny’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/emmeans_1.2.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘emmeans’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/effects_4.0-2.tar.gz' had status 1
Warning in install.packages :
installation of package ‘effects’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/modelr_0.1.2.tar.gz' had status 1
Warning in install.packages :
installation of package ‘modelr’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/merTools_0.4.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘merTools’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/sjlabelled_1.0.11.tar.gz' had status 1
Warning in install.packages :
installation of package ‘sjlabelled’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/sjmisc_2.7.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘sjmisc’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/sjstats_0.15.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘sjstats’ had non-zero exit status
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec/downloaded_packages/ggeffects_0.3.4.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ggeffects’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages’
Thanks for any help!
Edit: I tried installing from the tools menu from the files in temp but got a similar error:
> install.packages("C:/Users/Coldzero/AppData/Local/Temp/Rtmps96tec/downloaded_packages/sjstats_0.15.0.tar.gz", repos = NULL, type = "source")
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"E:/Program Files/R/R-3.3.3/bin/x64/R" CMD INSTALL -l "E:\Program Files\R\R-3.3.3\library" "C:/Users/Coldzero/AppData/Local/Temp/Rtmps96tec/downloaded_packages/sjstats_0.15.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/Coldzero/AppData/Local/Temp/Rtmps96tec/downloaded_packages/sjstats_0.15.0.tar.gz’ had non-zero exit status
I also tried using devtools to install straight from github:
install_github("strengejacke/sjPlot")
> install_github("strengejacke/sjPlot")
Downloading GitHub repo strengejacke/sjPlot#master
from URL https://api.github.com/repos/strengejacke/sjPlot/zipball/master
Installing sjPlot
Installing 1 package: arm
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/arm_1.10-1.zip'
Content type 'application/zip' length 219529 bytes (214 KB)
downloaded 214 KB
package ‘arm’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: effects
There is a binary version available (and will be installed) but the source version is later:
binary source
effects 4.0-1 4.0-2
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/effects_4.0-1.zip'
Content type 'application/zip' length 1508494 bytes (1.4 MB)
downloaded 1.4 MB
package ‘effects’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: ggeffects
There is a binary version available (and will be installed) but the source version is later:
binary source
ggeffects 0.3.2 0.3.4
also installing the dependencies ‘emmeans’, ‘modelr’, ‘prediction’, ‘sjlabelled’, ‘sjmisc’, ‘sjstats’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/emmeans_1.1.3.zip'
Content type 'application/zip' length 1052492 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/modelr_0.1.1.zip'
Content type 'application/zip' length 135311 bytes (132 KB)
downloaded 132 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/prediction_0.3.2.zip'
Content type 'application/zip' length 140872 bytes (137 KB)
downloaded 137 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sjlabelled_1.0.8.zip'
Content type 'application/zip' length 205033 bytes (200 KB)
downloaded 200 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sjmisc_2.7.1.zip'
Content type 'application/zip' length 311847 bytes (304 KB)
downloaded 304 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/sjstats_0.14.2-3.zip'
Content type 'application/zip' length 378915 bytes (370 KB)
downloaded 370 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/ggeffects_0.3.2.zip'
Content type 'application/zip' length 264629 bytes (258 KB)
downloaded 258 KB
package ‘emmeans’ successfully unpacked and MD5 sums checked
package ‘modelr’ successfully unpacked and MD5 sums checked
package ‘prediction’ successfully unpacked and MD5 sums checked
package ‘sjlabelled’ successfully unpacked and MD5 sums checked
package ‘sjmisc’ successfully unpacked and MD5 sums checked
package ‘sjstats’ successfully unpacked and MD5 sums checked
package ‘ggeffects’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: knitr
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/knitr_1.20.zip'
Content type 'application/zip' length 892099 bytes (871 KB)
downloaded 871 KB
package ‘knitr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: lme4
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/lme4_1.1-17.zip'
Content type 'application/zip' length 5220055 bytes (5.0 MB)
downloaded 5.0 MB
package ‘lme4’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Skipping install of 'modelr' from a cran remote, the SHA1 (0.1.1) has not changed since last install.
Use `force = TRUE` to force installation
Installing 1 package: psych
There is a binary version available (and will be installed) but the source version is later:
binary source
psych 1.8.3.3 1.8.4
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/psych_1.8.3.3.zip'
Content type 'application/zip' length 5388180 bytes (5.1 MB)
downloaded 5.1 MB
package ‘psych’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Installing 1 package: scales
also installing the dependency ‘viridisLite’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/viridisLite_0.3.0.zip'
Content type 'application/zip' length 56811 bytes (55 KB)
downloaded 55 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/scales_0.5.0.zip'
Content type 'application/zip' length 692819 bytes (676 KB)
downloaded 676 KB
package ‘viridisLite’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Coldzero\AppData\Local\Temp\Rtmps96tec\downloaded_packages
Skipping install of 'sjlabelled' from a cran remote, the SHA1 (1.0.8) has not changed since last install.
Use `force = TRUE` to force installation
Skipping install of 'sjmisc' from a cran remote, the SHA1 (2.7.1) has not changed since last install.
Use `force = TRUE` to force installation
Skipping install of 'sjstats' from a cran remote, the SHA1 (0.14.2-3) has not changed since last install.
Use `force = TRUE` to force installation
"E:/Program Files/R/R-3.3.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
"C:/Users/Coldzero/AppData/Local/Temp/Rtmps96tec/devtools42282da83eaa/strengejacke-sjPlot-87179d5" --library="E:/Program Files/R/R-3.3.3/library" \
--install-tests
'E:\Program' is not recognized as an internal or external command,
operable program or batch file.
Installation failed: Command failed (1)
Edit2:
I looked at the topic at github.com/r-lib/devtools/issues/1514. It was disabled for my E: drive but I enabled it, rebooted RStudio and I'm still having an issue for all three methods of installation. Still seems to be .tar.gz because I had a short moment of excitement when it worked for one of the dependencies in the folder that was a zip that I tried first.
Edit3:
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.13.5
loaded via a namespace (and not attached):
[1] httr_1.2.1 tidyr_0.8.0 splines_3.3.3 carData_3.0-1 modelr_0.1.1 assertthat_0.2.0 stats4_3.3.3 coin_1.2-2
[9] yaml_2.1.14 pillar_1.2.2 lattice_0.20-34 glue_1.2.0 digest_0.6.12 glmmTMB_0.2.0 snakecase_0.9.1 minqa_1.2.4
[17] colorspace_1.3-2 sandwich_2.3-4 Matrix_1.2-8 survey_3.33-2 plyr_1.8.4 psych_1.8.3.3 pkgconfig_2.0.1 broom_0.4.4
[25] haven_1.1.1 xtable_1.8-2 purrr_0.2.4 mvtnorm_1.0-7 scales_0.5.0 stringdist_0.9.4.7 lme4_1.1-17 emmeans_1.1.3
[33] git2r_0.21.0 arm_1.10-1 tibble_1.4.2 effects_4.0-1 bayesplot_1.5.0 ggplot2_2.2.1 sjlabelled_1.0.8 TH.data_1.0-8
[41] withr_2.1.2 TMB_1.7.13 nnet_7.3-12 lazyeval_0.2.0 cli_1.0.0 mnormt_1.5-5 survival_2.40-1 magrittr_1.5
[49] crayon_1.3.4 memoise_1.1.0 estimability_1.3 nlme_3.1-131 MASS_7.3-47 forcats_0.3.0 foreign_0.8-67 tools_3.3.3
[57] data.table_1.10.4 multcomp_1.4-8 stringr_1.2.0 munsell_0.4.3 prediction_0.3.2 bindrcpp_0.2.2 ggeffects_0.3.2 rlang_0.2.0
[65] grid_3.3.3 nloptr_1.0.4 ggridges_0.5.0 rstudioapi_0.7 gtable_0.2.0 codetools_0.2-15 abind_1.4-5 sjstats_0.14.2-3
[73] curl_2.4 reshape2_1.4.2 sjmisc_2.7.1 R6_2.2.0 zoo_1.8-0 pwr_1.2-2 knitr_1.20 dplyr_0.7.4
[81] bindr_0.1.1 modeltools_0.2-21 stringi_1.1.5 parallel_3.3.3 Rcpp_0.12.16 lmtest_0.9-35 tidyselect_0.2.4 coda_0.19-1
Seems like that's an old version of R was trying to find the version earlier but only found the rstudio version then forgot I was looking for it...

install.packages(...) fails on Windows 10

I am trying to install the dplyr package from Visual Studio 2017. It has a dependency on pillar.
When I perform an install from the command line, I get:
> install.packages('pillar')
Installing package into ‘C:/Users/Jérôme Verstrynge/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
pillar 1.2.1 1.2.2 FALSE
installing the source package ‘pillar’
trying URL 'http://cran.r-project.org/src/contrib/pillar_1.2.2.tar.gz'
Content type 'application/x-gzip' length 64185 bytes (62 KB)
downloaded 62 KB
* installing *source* package 'pillar' ...
** package 'pillar' successfully unpacked and MD5 sums checked
Warning in file(file, if (append) "a" else "w") :
cannot open file 'C:/Users/Jirtme Verstrynge/Documents/R/win-library/3.3/pillar/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") :
cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'pillar'
* removing 'C:/Users/Jérôme Verstrynge/Documents/R/win-library/3.3/pillar'
There is a bogus conversion of Jérôme Verstrynge into Jirtme Verstrynge.
How can I work around this?
More information
When I perform Get-WinSystemLocale from Windows 10 PowerShell, I get:
LCID Name DisplayName
---- ---- -----------
2057 en-GB English (United Kingdom)
Sys.getlocale() returns:
[1] "LC_COLLATE=English_United Kingdom.1252;
LC_CTYPE=English_United Kingdom.1252;
LC_MONETARY=English_United Kingdom.1252;
LC_NUMERIC=C;
LC_TIME=English_United Kingdom.1252"
Workaround
I have uninstalled Microsoft R client and reinstalled it from here. The client is now on version 3.4.3.0.
The issue has disappeared for the package pillar, but it is coming back with a package called dendextend while trying to install.packages('seriation').
The error is:
> install.packages('seriation')
Installing package into ‘C:/Users/Jérôme Verstrynge/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘dendextend’
There is a binary version available but the source version is later:
binary source needs_compilation
dendextend 1.7.0 1.8.0 FALSE
trying URL 'http://cran.r-project.org/bin/windows/contrib/3.4/seriation_1.2-3.zip'
Content type 'application/zip' length 1015954 bytes (992 KB)
downloaded 992 KB
package ‘seriation’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Temp\Rtmpi2lOd8\downloaded_packages
installing the source package ‘dendextend’
trying URL 'http://cran.r-project.org/src/contrib/dendextend_1.8.0.tar.gz'
Content type 'application/x-gzip' length 1758392 bytes (1.7 MB)
downloaded 1.7 MB
* installing *source* package 'dendextend' ...
** package 'dendextend' successfully unpacked and MD5 sums checked
Warning in file(file, if (append) "a" else "w") :
cannot open file 'C:/Users/Jirtme Verstrynge/Documents/R/win-library/3.4/dendextend/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") :
cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'dendextend'
* removing 'C:/Users/Jérôme Verstrynge/Documents/R/win-library/3.4/dendextend'
In R CMD INSTALL
The downloaded source packages are in
‘C:\Temp\Rtmpi2lOd8\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/MIE74D~1/RCLIEN~1/R_SERVER/bin/x64/R" CMD INSTALL -l "C:\Users\Jérôme Verstrynge\Documents\R\win-library\3.4" C:\Temp\Rtmpi2lOd8/downloaded_packages/dendextend_1.8.0.tar.gz' had status 1
2: In utils::install.packages(...) :
installation of package ‘dendextend’ had non-zero exit status
>
It seems there is an issue in utils::install.packages(...)
Issue solved
Apparently, on top of re-installing Microsoft R Client, the remaining issue was related to missing binary packages not available on CRAN repositories yet.
I doubt this has anything to do with the pillar package, but perhaps with the fact that this package is installed from source (unlike the default which is to install from binary). This problem will eventually resolve itself as the binary version of pillar 1.2.2 becomes available on your CRAN mirror (it's already there on CRAN and on https://cloud.r-project.org/web/packages/pillar/index.html).
What's the value of getOption("repos") on your system?
The mis-encoding of non-ASCII characters in this particular scenario feels like a problem which is best avoided by choosing an ASCII-only and space-free directory name for your home (e.g. C:\Users\jverstry instead of your current setting). To rule out a problem with Visual Studio, you could try installing the package from RGui or from the R terminal, please double-check that the installation path for the package is the same.

Error in library(qdap) : there is no package called ‘qdap’

I've installed qdap:
install.packages("qdap")
It takes a while to donwload everything but the console fills up with all the downloads and at the end I get a message like this:
Warning in install.packages :
installation of package ‘qdap’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpeTzuKz/downloaded_packages’
> library(qdap)
Error in library(qdap) : there is no package called ‘qdap’
>
This SO post led me to try adding dependencies = TRUE but the issue remains.
Here's session info
sessionInfo():
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0
Another post I found yesterday (cannot find it again now with a Google search) suggested I remove existing qdap files within my library directory, close my session, restart and fresh install. There was no package exactly called qdap but some with qdap in the name which I removed. My issue remained, I am unable to install qdap.
I'm not sure what other information to provide? Any help appreciated.
Here are the errors generated when attempting to install qdap:
./configure: line 3736: /usr/lib/jvm/default-java/jre/bin/java: No
such file or directory no configure: error: Java interpreter
'/usr/lib/jvm/default-java/jre/bin/java' does not work ERROR:
configuration failed for package ‘rJava’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/rJava’ Warning in install.packages : installation of package ‘rJava’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘openNLPdata’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/openNLPdata’ Warning
in install.packages : installation of package ‘openNLPdata’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘xlsxjars’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/xlsxjars’ Warning in install.packages : installation of package ‘xlsxjars’ had
non-zero exit status ERROR: dependency ‘rJava’ is not available for
package ‘venneuler’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/venneuler’ Warning
in install.packages : installation of package ‘venneuler’ had
non-zero exit status ERROR: dependencies ‘openNLPdata’, ‘rJava’ are
not available for package ‘openNLP’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/openNLP’ Warning in install.packages : installation of package ‘openNLP’ had
non-zero exit status ERROR: dependencies ‘rJava’, ‘xlsxjars’ are not
available for package ‘xlsx’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/xlsx’ Warning in install.packages : installation of package ‘xlsx’ had
non-zero exit status ERROR: dependencies ‘openNLP’, ‘venneuler’,
‘xlsx’ are not available for package ‘qdap’
* removing ‘/home/myname/R/x86_64-pc-linux-gnu-library/3.4/qdap’ Warning in install.packages : installation of package ‘qdap’ had
non-zero exit status
Since this looks like a rJava issue I found this post and tried the top voted answer in the terminal:
apt-get install r-cran-rjava
Resulted in:
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I'm hoping theres a way around this without being a root user? I'm not as familiar with linux. I'm able to install other p packages.
There is a solution for this issue when you have no root access.
Download Java (make sure to install JDK) and install it inside your $HOME
You can do that as Oracle's Java is just a tar.gz package
Make sure to set JAVA_HOME
export JAVA_HOME=$HOME/opt/my_jdk_installation
Once you have Java you have to reconfigure R
Simply tell R where your Java is
R CMD javareconf \
JAVA_HOME=${JAVA_HOME} \
JAVA=${JAVA_HOME}/bin/java \
JAVAC=${JAVA_HOME}/bin/javac \
JAVAH=${JAVA_HOME}/bin/javah \
JAR=${JAVA_HOME}/bin/jar \
JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/server \
JAVA_CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux"
Since now, R should use your personal installation of Java. This way, you don't depend on sys admin.

RMongo installation fails with Segmentation Fault in Ubuntu

I've been for last couple of hours trying to install the RMongo package with the following output:
> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://repo.bppt.go.id/cran/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Segmentation fault (core dumped)
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/RMongo’
The downloaded source packages are in
‘/tmp/RtmpHZoomn/downloaded_packages’
Warning message:
In install.packages("RMongo") :
installation of package ‘RMongo’ had non-zero exit status
I've also identified the same error trying to install xlsx.
I don't know what has changed in the past distros, since I've tried this with Ubuntu 16.04.2 and Ubuntu 17.04, with the same result.
This is a description of the R environment in the Ubuntu 16.04.2 distro:
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=es_ES.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=es_ES.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=es_ES.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0 tcltk_3.4.0
Any idea about what can be happening?
linux-image-3.13.0-121-generic and linux-image-4.4.0-81-generic contain a fix for the Stack Clash vulnerability.
Be careful with kernel updates, which fix this vulnerability. Current patch breaks many java (sun/oracle and openjdk) applications. See Bug #1699772: linux-image-4.4.0-81-generic, linux-image-3.13.0-121-generic Regression: many user-space apps crashing. The solution is to temporary reboot system with old kernel (linux-image-3.13.0-119-generic in Trusty).
Ubuntu kernel developers will prepare new patch in a few days.
UPDATE: Latest updates (at least image-4.4.0-83-generic, linux-image-4.8.0-58-generic, linux-image-4.10.0-26-generic) fix this vulnerability and problems with user-space programs.
This doesn't answer to the problems that I'm experiencing with RMongo, but solves the problem for me, so I hope it can be useful.
I've continued making some tests. Since this problem started when RMongo suddenly stopped from working, and taking into account that I had a similar installation that was working properly, I started to compare both environments.
I've checked that, in the system that is failing, some software updates were performed (you can check them below):
The following NEW packages will be installed
libmircommon7 libmircore1 linux-headers-4.4.0-81 linux-headers-4.4.0-81-generic linux-image-4.4.0-81-generic
linux-image-extra-4.4.0-81-generic
The following packages will be upgraded:
click firefox firefox-locale-en flashplugin-installer gir1.2-click-0.4 google-chrome-stable grub-common grub-pc
grub-pc-bin grub2-common libc-bin libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev libclick-0.4-0 libepoxy0
libgnutls-openssl27 libgnutls30 libmirclient9 libmircookie2 libmirprotobuf3 libmwaw-0.3-3 libnss3 libnss3-nssdb
libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5sql5
libqt5sql5-sqlite libqt5test5 libqt5widgets5 libqt5xml5 libssl-dev libssl-doc libssl1.0.0 libvlc5 libvlccore8
libzzip-0-13 linux-firmware linux-headers-generic linux-image-generic linux-libc-dev locales multiarch-support
openssl python3-click-package vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-samba
So, I've checked one by one this packages, and it turns out that the root of the problem is the new kernel 4.4.0-81.
In order to be sure that this is the root of the problem, I've launched by Ubuntu distro with the previous version of the kernel that I had in my laptop: 4.4.0-79
And this is the result of the installation:
> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB
* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (RMongo)
The downloaded source packages are in
‘/tmp/RtmpJScKfz/downloaded_packages’
> install.packages("xlsx")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/xlsx_0.5.7.tar.gz'
Content type 'application/x-gzip' length 312839 bytes (305 KB)
==================================================
downloaded 305 KB
* installing *source* package ‘xlsx’ ...
** package ‘xlsx’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (xlsx)
The downloaded source packages are in
‘/tmp/RtmpJScKfz/downloaded_packages’
Both packages, xlsx and RMongo, are now successfully installed and working.
I've also checked the relationship between xlsx and RMongo, and I'm afraid that problem underneath is rJava (common dependency). As a matter of fact, in order to be sure about this, I've made tests with other packages rJava-dependant (RWeka) and I had the same problem, solved after changing the kernel version.
== UPDATE ==
After the last kernel update, from 4.4.0-81 to 4.4.0-83, the problem has been fixed.
Same problem (at least for package "xlsx") occurs in Ubuntu 14.04 LTS with kernel 3.13.0-121-generic. When booting with the previous kernel (3.13.0-119-generic) installation works and library loads.
UPDATE: problem appears to be solved in Ubuntu 14.04 LTS by new kernel 3.13.0-123-generic

Can't install package reshape2 for R 2.15.3 on Ubuntu 12.04.4

I am having trouble installing the reshape2 package for R 2.15.3 on Ubuntu 12.04.4 LTS. I decided not to upgrade to R 3.x because many of the packages that I use have not been upgraded to support the new version.
When I try to install reshape2 using R 2.15.3 on Ubuntu 12.04.4 LTS, I get the following.
> install.packages("reshape2")
Installing package(s) into â/usr/local/lib/R/site-libraryâ
(as âlibâ is unspecified)
Warning in install.packages("reshape2") :
'lib = "/usr/local/lib/R/site-library"' is not writable
Would you like to use a personal library instead? (y/n) y
Would you like to create a personal library
~/R/x86_64-pc-linux-gnu-library/2.15
to install packages into? (y/n) y
Warning: dependency âRcppâ is not available
also installing the dependencies âplyrâ, âstringrâ
trying URL 'http://cran.cs.wwu.edu/src/contrib/plyr_1.8.1.tar.gz'
Content type 'application/x-gzip' length 393233 bytes (384 Kb)
opened URL
==================================================
downloaded 384 Kb
trying URL 'http://cran.cs.wwu.edu/src/contrib/stringr_0.6.2.tar.gz'
Content type 'application/x-gzip' length 20636 bytes (20 Kb)
opened URL
==================================================
downloaded 20 Kb
trying URL 'http://cran.cs.wwu.edu/src/contrib/reshape2_1.2.2.tar.gz'
Content type 'application/x-gzip' length 27220 bytes (26 Kb)
opened URL
==================================================
downloaded 26 Kb
ERROR: dependency âRcppâ is not available for package âplyrâ
* removing â/home/ubuntu/R/x86_64-pc-linux-gnu-library/2.15/plyrâ
* installing *source* package âstringrâ ...
** package âstringrâ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (stringr)
ERROR: dependency âplyrâ is not available for package âreshape2â
* removing â/home/ubuntu/R/x86_64-pc-linux-gnu-library/2.15/reshape2â
The downloaded source packages are in
â/tmp/RtmpxP5OIc/downloaded_packagesâ
Warning messages:
1: In install.packages("reshape2") :
installation of package âplyrâ had non-zero exit status
2: In install.packages("reshape2") :
installation of package âreshape2â had non-zero exit status
>
I tried to then install the missing Rcpp but get the error message:
Warning message:
package âRcppâ is not available (for R version 2.15.3)
I searched some more and discovered that Rcpp now requires R version 3.x but that there is a RcppClassic version that is backwards compatible.
When trying to install RcppClassic, I get:
Installing package(s) into â/home/ubuntu/R/x86_64-pc-linux-gnu-library/2.15â
(as âlibâ is unspecified)
Warning: dependency âRcppâ is not available
trying URL 'http://cran.cs.wwu.edu/src/contrib/RcppClassic_0.9.5.tar.gz'
Content type 'application/x-gzip' length 185057 bytes (180 Kb)
opened URL
==================================================
downloaded 180 Kb
ERROR: dependency âRcppâ is not available for package âRcppClassicâ
* removing â/home/ubuntu/R/x86_64-pc-linux-gnu-library/2.15/RcppClassicâ
The downloaded source packages are in
â/tmp/RtmpxP5OIc/downloaded_packagesâ
Warning message:
In install.packages("RcppClassic") :
installation of package âRcppClassicâ had non-zero exit status
I then tried and was able to install Rcpp using "sudo apt-get install r-cran-rcpp":
$ sudo apt-get install r-cran-rcpp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libgudev-1.0-0 gir1.2-gudev-1.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
littler r-cran-int64
Suggested packages:
r-cran-getopt r-cran-inline
The following NEW packages will be installed:
littler r-cran-int64 r-cran-rcpp
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Need to get 2,899 kB of archives.
After this operation, 11.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise/universe littler amd64 0.1.5-1 [32.2 kB]
Get:2 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise/universe r-cran-int64 amd64 1.1.2-1 [359 kB]
Get:3 http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise/universe r-cran-rcpp amd64 0.9.9-1 [2,508 kB]
Fetched 2,899 kB in 0s (8,959 kB/s)
Selecting previously unselected package littler.
(Reading database ... 60157 files and directories currently installed.)
Unpacking littler (from .../littler_0.1.5-1_amd64.deb) ...
Selecting previously unselected package r-cran-int64.
Unpacking r-cran-int64 (from .../r-cran-int64_1.1.2-1_amd64.deb) ...
Selecting previously unselected package r-cran-rcpp.
Unpacking r-cran-rcpp (from .../r-cran-rcpp_0.9.9-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up littler (0.1.5-1) ...
Setting up r-cran-int64 (1.1.2-1) ...
Setting up r-cran-rcpp (0.9.9-1) ...
But when I tried to install "reshape2" in R, I got the same error messages as before.
What I don't understand is why I'm getting the error message:
Warning: dependency âRcppâ is not available
Since 'sudo apt-get install r-cran-rcpp' worked
After some more searching, I found a vignette on how to use RcppClassic here: http://cran.r-project.org/web/packages/RcppClassic/vignettes/RcppClassic-intro.pdf
However, making modifications to the DESCRIPTION, NAMESPACE and MAKEVAR files is starting to go beyond my capabilities so I'm reaching out for help.
Here's the output from sessionInfo():
> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Thanks in advance!
EDIT 3/15/2014: My "use case" is that I'm running a series of periodic jobs on AWS EC2 instances so I don't need the latest/greatest software features. What I have using R 2.15 on my Mac development machine works so I was just looking to port what I have to my AWS EC2 Ubuntu instances.
The packages I use are: reshape2, xlsx (and xlsxjars), RJSONIO, stringr, R2HTML, RCurl, plots, lattice, latticeExtra, gdata and ggplot2.
A few things:
You insist on Ubuntu 12.04 LTS. A stable distribution. That is fine. Your choice. It also means you chose to freeze your software at a point a few months before April 2012.
Now you want something from CRAN. Something current. That is in conflict with the previous point.
Either you stay in distro. Or you become current.
Read the Ubuntu README and learn to how to stay with Ubuntu 12.04 yet at the same time get a current R package.
Install R 3.0.3 (current) via that repo.
Install the CRAN packages you want into /usr/local/lib/R/site-library.

Resources