Cannot install package "predictionet" on Windows - windows

I am trying to install predictionet but having troubles. Clearly there are no windows binaries available so I have been trying to install by building from source.
I have Rtools installed from here.
So far I have tried to use this command:
> install.packages("C:/Users/Blah/predictionet_1.10.0.tar.gz", repos = NULL, type="source")
But I am receiving this error message:
Installing package into ‘C:/Users/Blah/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package 'predictionet' ...
** libs
*** arch - i386
Warning: running command 'make -f "C:/PROGRA~1/R/R-31~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-31~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="predictionet.dll" OBJECTS="foo_mrmr.o mrnet_adapted.o mrnet_adapted2.o mrnet_ensemble_standalone.o"' had status 309
ERROR: compilation failed for package 'predictionet'
* removing 'C:/Users/Blah/Documents/R/win-library/3.1/predictionet'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Blah\Documents\R\win-library\3.1" "C:/Users/Blah/Desktop/predictionet_1.10.0.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/Blah/Desktop/predictionet_1.10.0.tar.gz’ had non-zero exit status
I am new to R so have no idea how to go about troubleshooting this, any help would be much obliged!
Note: I am using Rstudio

You may try :
source("http://bioconductor.org/biocLite.R")
biocLite("predictionet")

Related

rJava not installing on new laptop

Just received a new GTX laptop, and for whatever reason, I am simply not able to install rJava. No matter what I do with the Java and JDK installs, I get the following message. I have been uninstalling, rebooting, re-installing, Java (latest versions) and RTools, and yet, I still cannot get rJava to install.
I am using Rstudio as my gui, and I have been able to successfully install rJava on an Ubuntu machine, but for whatever reason, I cannot get this to work on my windows GPU laptop.
I realize this is a question that appears to have been answered in other threads, but I am not seeing the same situation as mine. Something is different, and I can't figure it out.
What else can I provide to help someone help me?
* installing *source* package 'rJava' ...
** package 'rJava' successfully unpacked and MD5 sums checked
** using staged installation
Generate Windows-specific files (src/jvm-w32) ...
make: Entering directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/src/jvm-w32'
C:/Rtools/mingw_64/bin/dlltool --as C:/Rtools/mingw_64/bin/as --input-def jvm64.def --kill-at --dllname jvm.dll --output-lib libjvm.dll.a
C:/Rtools/mingw_64/bin/gcc -O2 -c -o findjava.o findjava.c
C:/Rtools/mingw_64/bin/gcc -s -o findjava.exe findjava.o
make: Leaving directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/src/jvm-w32'
Find Java...
JAVA_HOME=C:/PROGRA~1/Java/jdk-14
=== Building JRI ===
JAVA_HOME=C:/PROGRA~1/Java/jdk-14
R_HOME=C:/PROGRA~1/R/R-36~1.3
JDK has no javah.exe - using javac -h . instead
Creating Makefiles ...
Configuration done.
make -C src JRI.jar
make[1]: Entering directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/jri/src'
C:/PROGRA~1/Java/jdk-14/bin/javac -h . -d . ../RList.java ../RBool.java ../RVector.java ../RMainLoopCallbacks.java ../RConsoleOutputStream.java ../Mutex.java ../Rengine.java ../REXP.java ../RFactor.java ../package-info.java
..\Rengine.java:120: error: invalid use of a restricted identifier 'yield'
while (!alive && !died) yield();
^
(to invoke a method called yield, qualify the yield with a receiver or type name)
1 error
make[1]: *** [Makefile.all:41: org/rosuda/JRI/Rengine.class] Error 1
make[1]: Leaving directory '/Users/bfcgl/AppData/Local/Temp/RtmpOcP1l8/R.INSTALLa750514e17ed/rJava/jri/src'
make: *** [Makefile.all:19: src/JRI.jar] Error 2
**** WARNING: JRI could NOT be built
Set IGNORE=1 if you want to build rJava anyway.
ERROR: configuration failed for package 'rJava'
* removing 'C:/Users/bfcgl/OneDrive/Documents/R/win-library/3.6/rJava'
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
I had the same problem (although installing for the first time on an old laptop) and can confirm that JDK 11 solved the problem
I still looking for the same problem resolution, meanwhile, I tried with Java JDK 11 and I succeed in RStudio. If this helps, try it. I will keep searching for the answer why the new version is not working.
Regards,

Not able to install mapview in Rstudio server

I am not able to install mapview in Rstudio server hosted on ubuntu. Getting the below error.Can someone please help
Error:
ERROR: configuration failed for package ‘gdtools’
* removing ‘/home/sshuser/R/x86_64-pc-linux-gnu-library/3.4/gdtools’
Warning in install.packages :
installation of package ‘gdtools’ had non-zero exit status
ERROR: dependency ‘rgdal’ is not available for package ‘gdalUtils’
* removing ‘/home/sshuser/R/x86_64-pc-linux-gnu-library/3.4/gdalUtils’
Warning in install.packages :
installation of package ‘gdalUtils’ had non-zero exit status
ERROR: dependency ‘units’ is not available for package ‘sf’
* removing ‘/home/sshuser/R/x86_64-pc-linux-gnu-library/3.4/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
ERROR: dependency ‘gdtools’ is not available for package ‘svglite’
* removing ‘/home/sshuser/R/x86_64-pc-linux-gnu-library/3.4/svglite’
Warning in install.packages :
installation of package ‘svglite’ had non-zero exit status
ERROR: dependencies ‘gdalUtils’, ‘sf’, ‘svglite’ are not available for package ‘mapview’
* removing ‘/home/sshuser/R/x86_64-pc-linux-gnu-library/3.4/mapview’
Warning in install.packages :
installation of package ‘mapview’ had non-zero exit status
sudo apt-get install libproj-dev libgdal-dev
solved my issue.

Problems with rcpp install - command not found

On a Mac with Sierra OS and the latest versions of xcode command line tools and r/rstudio, when trying to install rcpp I get the following error. Is this a path problem? Any help would be greatly appreciated!
> install.packages("Rcpp", type = "source")
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_0.12.12.tar.gz'
Content type 'application/x-gzip' length 2421289 bytes (2.3 MB)
==================================================
downloaded 2.3 MB
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
sh: mv: command not found
** libs
sh: make: command not found
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp’
sh: rm: command not found
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/hn/zpnk2qsx19x1y974vym8wr7r0000gn/T/RtmptRz4Oe/downloaded_packages’

Error downloading shinyapps from github

I'm trying to download the package shinyapps following the instructions given in:
http://shiny.rstudio.com/articles/shinyapps.html
but I am having some errors.
I am on Windows 64 bit; my R version is R x64 3.2.1; my RStudio version is 0.99.447.
Here you can find the command I used:
if (!require("devtools"))
install.packages("devtools")
devtools::install_github("rstudio/shinyapps")
The devtools package seems correctly installed but I get the following error:
Downloading github repo rstudio/shinyapps#master
Installing shinyapps
"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/myname/AppData/Local/Temp/RtmpsbU7D7/devtools112063ad32a2/rstudio-shinyapps-688a4ac" \
--library="\\someadress/R/win-library/3.2" --install-tests
* installing *source* package 'shinyapps' ...
** R
** inst
** tests
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
there is no package called 'shinyapps'
Error: loading failed
Execution halted
*** arch - x64
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
there is no package called 'shinyapps'
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing '\\someadress/Users/myname/Documents/R/win-library/3.2/shinyapps'
Error: Command failed (1)
I also tried to manually download the package from github (shinyapps-master.zip), unzip the folder and copy the folder into the R library folder. First of all the folder is not called shinyapps but shinyapps-master; I tried to call the library both as shinyapps and shinyapps-master but without success. Do you have any suggestions?

Install R package from source, without changing PATH (Windows)

I'm trying to install package rpart for R-2.14.0 on Windows 7, but I get the warning:
package ‘rpart’ is not available (for R version 2.14.0)
So I download the tar.gz file from the package page. I have installed Rtools but I disabled all the options, including the one that changes the PATH. Then I do the following:
> install.packages("C:/rpart_3.1-50.tar.gz", type="source")
Installing package(s) into ‘C:/Users/backupSam/Documents/R/win-library/2.14’
(as ‘lib’ is unspecified)
inferring 'repos = NULL' from the file name
* installing *source* package 'rpart' ...
** libs
*** arch - i386
ERROR: compilation failed for package 'rpart'
* removing 'C:/Users/backupSam/Documents/R/win-library/2.14/rpart'
* restoring previous 'C:/Users/backupSam/Documents/R/win-library/2.14/rpart'
Warning messages:
1: running command 'C:/PROGRA~1/R/R-214~1.0/bin/i386/R CMD INSTALL -l "C:/Users/backupSam/Documents/R/win-library/2.14" "C:/rpart_3.1-50.tar.gz"' had status 1
2: In install.packages("C:/rpart_3.1-50.tar.gz", type = "source") :
installation of package ‘C:/rpart_3.1-50.tar.gz’ had non-zero exit status
Any suggestions?
Since you have to set the PATH, but you're hesitant to do so because you're afraid you may hose something up, you can do it temporarily in your R session via:
pathRtools <- paste(c("c:\\Rtools\\bin",
"c:\\Rtools\\MinGW\\bin",
"c:\\MiKTeX\\miktex\\bin",
"c:\\R\\bin\\i386",
"c:\\windows",
"c:\\windows\\system32"), collapse=";")
Sys.setenv(PATH=paste(pathRtools,Sys.getenv("PATH"),sep=";"))

Resources