Issues with installing readxl package - r

I am trying to install the new readxl package on a Windows 64 bit machine. I tried the following commands for the installation
install.packages("devtools")
library(devtools)
install.packages("Rcpp")
library(Rcpp)
install_github("hadley/readxl")
I get the following error with the install_github command:
Installing github repo readxl/master from hadley
Downloading master.zip from https://github.com/hadley/readxl/archive/master.zip
Installing package from C:\Users\RAVISH~1.R\AppData\Local\Temp\RtmpUTzCUH/master.zip
Installing readxl
"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" --vanilla CMD INSTALL \
"C:\Users\ravishankar.r\AppData\Local\Temp\RtmpUTzCUH\devtools585870ed251a\readxl-master" \
--library="C:/Users/ravishankar.r/Documents/R-dev" --install-tests
* installing *source* package 'readxl' ...
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-31~1.2/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.2/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="readxl.dll" OBJECTS="RcppExports.o XlsWorkBook.o XlsWorkSheet.o XlsxWorkBook.o XlsxWorkSheet.o benchmarks.o endian.o ole.o xls.o xlstool.o zip.o"' had status 127
ERROR: compilation failed for package 'readxl'
* removing 'C:/Users/ravishankar.r/Documents/R-dev/readxl'
Error: Command failed (1)
Could someone help with me this error?

Installing the correct version of Rtools fixed the issue. For R 3.1.2, I had to install Rtools 3.1.

Related

Unable to install magrittr

Got a new company laptop and tried to install tidyr or installr, but it always fails because of magrittr.
If I want to install this package directly I'm getting the following error code:
* installing *source* package 'magrittr' ...
** package 'magrittr' successfully unpacked and MD5 sums checked
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-33~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.1/share/make/winshlib.mk" SHLIB="magrittr.dll" OBJECTS="pipe.o utils.o"' had status 127
ERROR: compilation failed for package 'magrittr'
* removing 'C:/Users/xxxx/Documents/R/win-library/3.3/magrittr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\xxxx\Documents\R\win-library\3.3" C:\Users\xxxx\AppData\Local\Temp\1\RtmpMHlNI9/downloaded_packages/magrittr_2.0.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘magrittr’ had non-zero exit status
I don't have admin privileges on this computer and could imagine that this could be the source of the problem, but I'm not sure.
What I tried:
Changed folder for libraries
Reinstalled all libraries
Tried different cron repos
Tried to install it on this way: install.packages("magrittr", update.packages(checkBuilt = TRUE))
Always the same error.
Is there any other way to install it?
Installing an archived version from source will work.
install.packages("cran.r-project.org/src/contrib/Archive/magrittr/…", repos = NULL, type="source")
You can utilize conda to install it:
conda install -c r r-magrittr
Reference:
https://anaconda.org/r/r-magrittr

“installation of package tuneR had non-zero exit status” in R

OS: Ubuntu 18.04
R version: 3.4.3 and 3.4.4
I tried to install tuneR with install.packages("tuneR") in R 3.4.3 and R 3.4.4 but I get this error:
* installing *source* package ‘signal’ ...
package ‘signal’ successfully unpacked and MD5 sums checked
libs
gfortran -fpic -g -O2 -fdebug-prefix-map=/build/r-base-AitvI6/r-base-3.4.4=. -fstack-protector-strong -c dpchim.f -o dpchim.o
/bin/bash: gfortran: command not found
/usr/lib/R/etc/Makeconf:182: recipe for target 'dpchim.o' failed
make: *** [dpchim.o] Error 127
ERROR: compilation failed for package ‘signal’
* removing ‘/home/helias/R/x86_64-pc-linux-gnu-library/3.4/signal’
ERROR: dependency ‘signal’ is not available for package ‘tuneR’
* removing ‘/home/helias/R/x86_64-pc-linux-gnu-library/3.4/tuneR’
The downloaded source packages are in
‘/tmp/RtmpL1f4HR/downloaded_packages’
Warning messages:
1: In install.packages("tuneR") :
installation of package ‘signal’ had non-zero exit status
2: In install.packages("tuneR") :
installation of package ‘tuneR’ had non-zero exit status
(I also used RStudio)
I solved installing gfortran and after re-run install.packages("tuneR")
sudo apt install gfortran
You can try downloading the source and install from RStudio. tuneR is available at:
https://CRAN.R-project.org/package=tuneR
Download the .tar.gz file and install locally. You can install using through RStudio (Packages tab -> change install from: Package), or you can install through the terminal using
R CMD INSTALL -l /path tuneR.tar.gz
Another option is
> library(devtools)
> install_github("cran/tuneR")

Installing package "icd9" in R from Github with Rtools ERROR

I'm trying to install package "icd9" from Github repository.
First I've installed devtools package.
Then
devtools::install_github("jackwasey/icd9")
After this line I have following report:
Downloading GitHub repo jackwasey/icd9#master
Installing icd9
"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" --no-site-file --no-environ --no-save \
--no-restore CMD INSTALL \
"C:/Users/rubal/AppData/Local/Temp/RtmpEHgKOa/devtools1fd4455976bc/jackwasey-
icd9-ad36b5b" \
--library="C:/Users/rubal/Documents/R/win-library/3.2" --install-tests
* installing *source* package 'icd9' ...
Предупреждение: работающая команда 'sh ./configure.win' имеет статус 127
ERROR: configuration failed for package 'icd9'
* removing 'C:/Users/rubal/Documents/R/win-library/3.2/icd9'
Error: Command failed (1)
What I do wrong? How could I install this package?
Latecomer to this question, but as I'm the author of the said package, I should let you know that 'icd9' is deprecated. Now all ICD-9 and ICD-10 functions are contained in the much slicker, much faster icd package on CRAN.

Error installing BigVis package in RStudio Version 3.0.2

When I run the code to install BigVis package from GitHub as follows,
devtools::install_github("bigvis")
I get the following output:
Installing github repo bigvis/master from hadley
Downloading master.zip from https://github.com/hadley/bigvis/archive/master.zip
Installing package from /var/folders/dl/hhhtf5f52hz7qrw93wfyk_6h0000gn/T//RtmpgkDD2j/master.zip
arguments 'minimized' and 'invisible' are for Windows only
Installing bigvis
'/Library/Frameworks/R.framework/Resources/bin/R' \
--vanilla CMD INSTALL \
'/private/var/folders/dl/hhhtf5f52hz7qrw93wfyk_6h0000gn/T/RtmpgkDD2j/devtools259f1fe8bc61/bigvis-master' \
--library='/Library/Frameworks/R.framework/Versions/3.0/Resources/library' \
--install-tests
* installing *source* package 'bigvis' ...
** libs
sh: make: command not found
ERROR: compilation failed for package 'bigvis'
* removing '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/bigvis'
Error: Command failed (1)
DO YOU HAVE ANY IDEA HOW I MAY FIX IT? THANKS
The error message sh: make: command not found tells you that the program sh could not find the program make. So my crystal ball tells me you might need to install GNU make. But I know nothing about RStudio nor BigVis.

How to install xps package for R 3.0.3

I am trying to install the xps package from http://www.bioconductor.org/packages/release/bioc/html/xps.html
for R 3.0.3 on Windows 8.1 x64.
When I try:
source("http://bioconductor.org/biocLite.R")
biocLite("xps")
I get the following messages:
BioC_mirror: http://bioconductor.org
Using Bioconductor version 2.13 (BiocInstaller 1.12.0), R version 3.0.3.
Installing package(s) 'xps'
package ‘xps’ is available as a source package but not as a binary
Warning message:
package ‘xps’ is not available (for R version 3.0.3)
So I try installing by downloading the package source for xps
When I try to install it I get the following message:
* installing *source* package 'xps' ...
testing for presence of ROOT...
perl: not found
found of ROOT in directory C:\root\/bin...OK
** libs
running 'src/Makefile.win' ...
Syntax error: Unterminated quoted string
Syntax error: Unterminated quoted string
g++ -pipe -mwindows -I/include -include w32pragma.h -O2 -DWIN32 -c TMLMath.cxx
cc1plus.exe: fatal error: w32pragma.h: No such file or directory
compilation terminated.
make: *** [TMLMath.o] Error 1
Warning: running command 'make --no-print-directory -f "Makefile.win"' had status 2
ERROR: compilation failed for package 'xps'
* removing 'D:/Program Files/R/R-3.0.3/library/xps'
The xps landing page says that xps is not available for 64-bit windows. If you run 32-bit R you'll be able to install the binary with biocLite.

Resources