2

Not in apt search but the package details here. Found in OS X so should be in Linux too. You can install the backend as sudo in R prompt by install.packages("mlr"), docs here about the package.

Trying to install shinyMlr by hhh's proposal

> devtools::install_github("mlr-org/shinyMlr/package")

Downloading GitHub repo mlr-org/shinyMlr@master
from URL https://api.github.com/repos/mlr-org/shinyMlr/zipball/master
Installing shinyMlr
trying URL 'https://cran.rstudio.com/src/contrib/DT_0.2.tar.gz'
Content type 'application/x-gzip' length 837622 bytes (817 KB)
==================================================
downloaded 817 KB

Installing DT
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL '/tmp/RtmpIWf6Ri/devtools85045e441aa/DT'  \
  --library='/usr/local/lib/R/site-library' --install-tests     
...    
Installing RWeka
trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-8.tar.gz'
Content type 'application/x-gzip' length 656615 bytes (641 KB)
==================================================
downloaded 641 KB

Installing rJava
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL '/tmp/RtmpIWf6Ri/devtools8504846fe1f/rJava'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

* installing *source* package ‘rJava’ ...
** package ‘rJava’ successfully unpacked and MD5 sums checked
...
checking whether JNI programs can be compiled... configure: error: Cannot compile a simple JNI program. See config.log for details.

Make sure you have Java Development Kit installed and correctly registered in R.
If in doubt, re-run "R CMD javareconf" as root.

ERROR: configuration failed for package ‘rJava’
* removing ‘/usr/local/lib/R/site-library/rJava’
Installation failed: Command failed (1)
trying URL 'https://cran.rstudio.com/src/contrib/RWekajars_3.9.1-3.tar.gz'
Content type 'application/x-gzip' length 9915777 bytes (9.5 MB)
==================================================
downloaded 9.5 MB

Installing RWekajars
trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-8.tar.gz'
Content type 'application/x-gzip' length 656615 bytes (641 KB)
==================================================
downloaded 641 KB

Skipping rJava, it is already being installed.
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL '/tmp/RtmpIWf6Ri/devtools8501fe8748f/RWekajars'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

ERROR: dependency ‘rJava’ is not available for package ‘RWekajars’
* removing ‘/usr/local/lib/R/site-library/RWekajars’
Installation failed: Command failed (1)
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL '/tmp/RtmpIWf6Ri/devtools850551cbf6d/RWeka'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

ERROR: dependencies ‘RWekajars’, ‘rJava’ are not available for package ‘RWeka’
* removing ‘/usr/local/lib/R/site-library/RWeka’
Installation failed: Command failed (1)
trying URL 'https://cran.rstudio.com/src/contrib/shinyBS_0.61.tar.gz'
Content type 'application/x-gzip' length 26923 bytes (26 KB)
==================================================
downloaded 26 KB

Installing shinyBS
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL '/tmp/RtmpIWf6Ri/devtools850747f9a75/shinyBS'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

* installing *source* package ‘shinyBS’ ...
** package ‘shinyBS’ 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 (shinyBS)
trying URL 'https://cran.rstudio.com/src/contrib/shinydashboard_0.6.1.tar.gz'
Content type 'application/x-gzip' length 236005 bytes (230 KB)
==================================================
downloaded 230 KB

Installing shinydashboard
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL '/tmp/RtmpIWf6Ri/devtools8501e8e169/shinydashboard'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

* installing *source* package ‘shinydashboard’ ...
...
Installing shinythemes
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL '/tmp/RtmpIWf6Ri/devtools850c7e739e/shinythemes'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

* installing *source* package ‘shinythemes’ ...
** package ‘shinythemes’ 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 (shinythemes)
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  '/tmp/RtmpIWf6Ri/devtools8503433e373/mlr-org-shinyMlr-a14be76/package'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

ERROR: dependency ‘RWeka’ is not available for package ‘shinyMlr’
* removing ‘/usr/local/lib/R/site-library/shinyMlr’
Installation failed: Command failed (1)

Errors in short

ERROR: dependency ‘rJava’ is not available for package ‘RWekajars’
ERROR: dependencies ‘RWekajars’, ‘rJava’ are not available for package ‘RWeka’
ERROR: dependency ‘RWeka’ is not available for package ‘shinyMlr’

I do successfully

  • sudo apt install r-cran-rjava

Problems so I cannot find rwekajars and rweka in apt, but I can find them in R packages as RWeka and RWekajars

apt search rwekajars
Sorting... Done
Full Text Search... Done

apt search rweka
Sorting... Done
Full Text Search... Done

Running again devtools::install_github("mlr-org/shinyMlr/package") but succeeds this time!

> devtools::install_github("mlr-org/shinyMlr/package")
Downloading GitHub repo mlr-org/shinyMlr@master
from URL https://api.github.com/repos/mlr-org/shinyMlr/zipball/master
Installing shinyMlr
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL  \
  '/tmp/RtmpVr3BCI/devtools19bf36effb2d/mlr-org-shinyMlr-a14be76/package'  \
  --library='/home/masi/R/x86_64-pc-linux-gnu-library/3.4' --install-tests 

* installing *source* package ‘shinyMlr’ ...
** R
** inst
** tests
** preparing package for lazy loading
Warning: Installed Rcpp (0.12.12) different from Rcpp used to build dplyr (0.12.11).
Please reinstall dplyr to avoid random crashes or undefined behavior.
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Warning: Installed Rcpp (0.12.12) different from Rcpp used to build dplyr (0.12.11).
Please reinstall dplyr to avoid random crashes or undefined behavior.
* DONE (shinyMlr)
> 

But still the test code below fails similarly as with failed runShinyMlr() installation attempt.

Trying to run runShinyMlr()

Test code

> runShinyMlr()
Error in runShinyMlr() : could not find function "runShinyMlr"

But still running the test code runShinyMlr(), I get could not find function.

Exporting some packages successfully and then trying unsucessfully the test code

> library("RWeka")
> library("RWekajar")
Error in library("RWekajar") : there is no package called ‘RWekajar’
> library("runShinyMlr")
Error in library("runShinyMlr") : 
  there is no package called ‘runShinyMlr’
> runShinyMlr()
Error in runShinyMlr() : could not find function "runShinyMlr"

Trying to install explicitly runShinyMlr() explicitly

Doing in the R prompt the following as sudo fails too.

> install.packages("runShinyMlr")
Installing package into ‘/home/masi/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning message:
package ‘runShinyMlr’ is not available (for R version 3.4.0) 

Trying to update Java configs by hhh's proposal

The command sudo R CMD javareconf fails with a fatal error. Solution to the problem - just install JDK like the following so this one work now!

sudo apt install default-jdk

Runs properly

sudo R CMD javareconf 
Java interpreter : /usr/lib/jvm/default-java/jre/bin/java
Java version     : 1.8.0_131
Java home path   : /usr/lib/jvm/default-java
Java compiler    : /usr/lib/jvm/default-java/bin/javac
Java headers gen.: /usr/lib/jvm/default-java/bin/javah
Java archive tool: /usr/lib/jvm/default-java/bin/jar

trying to compile and link a JNI program 
detected JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
detected JNI linker flags : -L$(JAVA_HOME)/jre/lib/amd64/server -ljvm
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux     -fpic  -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/stretch/r-base-3.4.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c conftest.c -o conftest.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o conftest.so conftest.o -L/usr/lib/jvm/default-java/jre/lib/amd64/server -ljvm -L/usr/lib/R/lib -lR


JAVA_HOME        : /usr/lib/jvm/default-java
Java library path: $(JAVA_HOME)/jre/lib/amd64/server
JNI cpp flags    : -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
JNI linker flags : -L$(JAVA_HOME)/jre/lib/amd64/server -ljvm
Updating Java configuration in /usr/lib/R
Done.

Outputs of the compilers - which test files do you want?

masi@masi:~/Desktop/Machine.learning.R$ /usr/bin/gcc
gcc: fatal error: no input files
compilation terminated.

masi@masi:~/Desktop/Machine.learning.R$ /usr/bin/java
Usage: java [-options] class [args...]
           (to execute a class)
...

masi@masi:~/Desktop/Machine.learning.R$ /usr/bin/gfortran
gfortran: fatal error: no input files
compilation terminated.

I have no $HOME/.bash_profile.

vim /home/masi/.bash
.bash_history  .bash_logout   .bashrc    

OS: Debian 9
R: 3.4.0

3
  • What have you done and where did it fail? What error messages?
    – schaiba
    Jul 20 '17 at 14:05
  • 1
    This is the error, you are misreading me > library("runShinyMlr") Error in library("runShinyMlr") : there is no package called ‘runShinyMlr’ -- you should have library(shinyMlr) and then try runShinyMlr().
    – hhh
    Jul 20 '17 at 19:39
  • 1
    @hhh Correct! Thank you! It works that way. Jul 20 '17 at 19:40
2

You can do it directly in R with devtools such that

devtools::install_github("mlr-org/shinyMlr/package")

and you start it with

library(shinyMlr)
shinyMlr::runShinyMlr()

further information here.

Other things to try

  1. Because shinyMlr requires the rJava, you may want to update your java configs in R with

    sudo R CMD javareconf 
    

also you may need to install the newest Java JDK. You can get the JDK here. To check up that you have JDK installed, you should have command line tools like below

$ /usr/bin/javac
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files and annotation processors
  -cp <path>                 Specify where to find user class files and annotation processors
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -proc:{none,only}          Control whether annotation processing and/or compilation is done.
  -processor <class1>[,<class2>,<class3>...] Names of the annotation processors to run; bypasses default discovery process
  -processorpath <path>      Specify where to find annotation processors
  -parameters                Generate metadata for reflection on method parameters
  -d <directory>             Specify where to place generated class files
  -s <directory>             Specify where to place generated source files
  -h <directory>             Specify where to place generated native header files
  -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
  -target <release>          Generate class files for specific VM version
  -profile <profile>         Check that API used is available in the specified profile
  -version                   Version information
  -help                      Print a synopsis of standard options
  -Akey[=value]              Options to pass to annotation processors
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system
  -Werror                    Terminate compilation if warnings occur
  @<filename>                Read options and filenames from file
  1. If this did not work, then try "mv ~/.bash_profile ~/.bash_profile_backup" so that your path is not intercepted by some your path variables.
4
  • 1
    @LéoLéopoldHertz준영 test first library(shinyMlr); runShinyMlr(), does it work? Alas, can you restart your editor/terminal? An environment command such as env in macOS can also reveal potential errors. You could also try moving dot files in ~ to elsewhere for a while and then try the installation -- if it does not fail, then there was some path variable mixing the installation.
    – hhh
    Jul 20 '17 at 19:36
  • 1
    @LéoLéopoldHertz준영 you may look here about what it looks with me. I think there is something wrong, it looks like a compiler issue. Can you run /usr/bin/gcc, /usr/bin/java, /usr/bin/gfortran -- I think you should ask a new question on getting the java configs correct, otherwise you may get odd errors or bad compilations later (I am not anymore using Anaconda so the configs there are a bit old).
    – hhh
    Jul 20 '17 at 20:00
  • 1
    @LéoLéopoldHertz준영 that is irrelevant -- you have Java command line tools (so apparently Java JDK installed) and other compliers seem to working. This is a compiler error and you should ask a new question on this. The error seems to be in gcc compiler.
    – hhh
    Jul 20 '17 at 20:14
  • Correct! Missing JDK in the system. Now, runs properly, please see the body. Any other tests which I should do? Jul 20 '17 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.