error installing package rweka however rjava is up to date - r

I am trying to install the package RWeka. I installed the java version 8, but i am keep getting this error. Can anybody help?
> install.packages('RWeka')
There is a binary version available but the source version is later:
binary source needs_compilation
RWeka 0.4-26 0.4-33 FALSE
installing the source package ‘RWeka’
trying URL 'https://cran.rstudio.com/src/contrib/RWeka_0.4-33.tar.gz'
Content type 'application/x-gzip' length 415763 bytes (406 KB)
==================================================
downloaded 406 KB
* installing *source* package ‘RWeka’ ...
** package ‘RWeka’ successfully unpacked and MD5 sums checked
Need at least Java version 1.7/7.0.
ERROR: configuration failed for package ‘RWeka’
* removing ``‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/RWeka’
Warning in install.packages :
installation of package ‘RWeka’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/sh/6qsjq6gn0ysf4h1cv9nctzfr0000gn/T/RtmpCVEaSY/downloaded_packages’``

From experience, I believe there is a difference between Java and Java Offline.
Try installing the x86/x64 offline version from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html (A handy link to keep hold of)

If you have the newest Java, just open a terminal and run
sudo R CMD javareconf
Then in a R-session,
install.packages("rJava",type='source')
install.packages("RWeka")
Ref: https://justrocketscience.com/post/install-rweka-mac

Related

R rJava will not install on Windows 10

I am trying to install RWeka in RStudio 1.2.5033
I have tried many different ways to install it, I re-installed Java64. Here is my latest try:
install.packages("rJava")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Jesse's PC/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
rJava 0.9-12 0.9-13 TRUE
installing the source package ‘rJava’
trying URL 'https://cran.rstudio.com/src/contrib/rJava_0.9-13.tar.gz'
Content type 'application/x-gzip' length 664898 bytes (649 KB)
downloaded 649 KB
* 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 '/c/Users/JESSE'~1/AppData/Local/Temp/RtmpuOekjT/R.INSTALL24344ae86868/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
make: c:/Rtools/mingw_64/bin/dlltool: Command not found
make: *** [Makefile:20: libjvm.dll.a] Error 127
make: Leaving directory '/c/Users/JESSE'~1/AppData/Local/Temp/RtmpuOekjT/R.INSTALL24344ae86868/rJava/src/jvm-w32'
ERROR: configuration failed for package 'rJava'
* removing 'C:/Users/Jesse's PC/Documents/R/win-library/3.6/rJava'
* restoring previous 'C:/Users/Jesse's PC/Documents/R/win-library/3.6/rJava'
Warning in install.packages :
installation of package ‘rJava’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Jesse's PC\AppData\Local\Temp\Rtmps5Y5TC\downloaded_packages’

Unable to install package Rcpp successfully in R Studio

I am unable to install the package "rcpp" in R Studio even though it was executed successfully. When I try to load the sasme library, it doesnt show me in the list of installed libraries.
install.packages("Rcpp")
Installing package into ‘C:/Users/sk/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/Rcpp_1.0.4.6.zip'
Content type 'application/zip' length 3030990 bytes (2.9 MB)
downloaded 2.9 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘Rcpp’
library(Rcpp)
Error in library(Rcpp) : there is no package called ‘Rcpp’
I was able to install by downloading the .tar.gz file from the archive link:
https://cran.r-project.org/src/contrib/Archive/Rcpp/
and installing this instead of directly from CRAN.
I had to install a few other libraries which were dependent on this library as well.

How install Rsymphony in Mac OS X 10.14

I have seen a lot of solutions to this problem before, but they can't solve it.
> install.packages("Rsymphony")
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘Rsymphony’
Do you want to attempt to install these from sources? (Yes/no/cancel) y
installing the source package ‘Rsymphony’
试开URL’https://cran.rstudio.com/src/contrib/Rsymphony_0.1-28.tar.gz'
Content type 'application/x-gzip' length 8631 bytes
==================================================
downloaded 8631 bytes
* installing *source* package ‘Rsymphony’ ...
** 成功将‘Rsymphony’程序包解包并MD5和检查
Cannot find SYMPHONY libraries and headers.
See <https://projects.coin-or.org/SYMPHONY>.
ERROR: configuration failed for package ‘Rsymphony’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rsymphony’
Warning in install.packages :
installation of package ‘Rsymphony’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/b0/n64bqfyn5y9dr3t427tljzv40000gn/T/RtmptYuOGn/downloaded_packages’
Before
brew install symphony
And Modify file R_symphony.cc & configure.
But there is still no change in this issue.
I know “SystemRequirements: SYMPHONY libraries and headers”,But I don't know how to solve it.

Error in installing *install.packages("tstools")* in language R

I am getting some error while installing package tstools.
Several other packages were installed correctly like(xts, forecast, MAPA, openxslx),
but this one causing trouble.
R version: 3.5.0
RStudio version: 1.1.447
CRAN: Indonesia
OS: windows 10
Here is the error log...
> install.packages("tstools")
Installing package into ‘C:/Users/pc_name/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘data.table’
There is a binary version available but the source version is later:
binary source needs_compilation
tstools 0.3.6 0.3.6.1 FALSE
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘data.table’
These will not be installed
installing the source package ‘tstools’
trying URL 'https://cran.rstudio.com/src/contrib/tstools_0.3.6.1.tar.gz'
Content type 'application/x-gzip' length 960748 bytes (938 KB)
downloaded 938 KB
ERROR: dependency 'data.table' is not available for package 'tstools'
* removing 'C:/Users/pc_name/Documents/R/win-library/3.5/tstools'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘tstools’ had non-zero exit status
The downloaded source packages are in ‘C:\Users\pc_name\AppData\Local\Temp\Rtmp6l4hr7\downloaded_packages’
Have you tried using devtools?
install.packages("devtools")
devtools::install_github("trnnick/TStools")
Sometimes bioconductor also does the trick
source("https://bioconductor.org/biocLite.R")
biocLite("tstools")
Have you tried install.packages("tstools", dependencies = T) ?

how to install r package for oracle on windows 10 64 bit

while installing rpackage Roracle on windows 10 i'm getting stuck at this point
install.packages("ROracle")
Installing package into ‘C:/Users/admin/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of C/C++/Fortran:
‘ROracle’
Do you want to attempt to install these from sources?
y/n: y
installing the source package ‘ROracle’
trying URL 'https://cran.rstudio.com/src/contrib/ROracle_1.3-1.tar.gz'
Content type 'application/x-gzip' length 308252 bytes (301 KB)
downloaded 301 KB
* installing *source* package 'ROracle' ...
** package 'ROracle' successfully unpacked and MD5 sums checked
ERROR: cannot find Oracle Client.
Please set OCI_LIB64 to specify its location.
Warning: running command 'sh ./configure.win' had status 1
ERROR: configuration failed for package 'ROracle'
* removing 'C:/Users/admin/Documents/R/win-library/3.3/ROracle'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\admin\Documents\R\win-library\3.3" C:\Users\admin\AppData\Local\Temp\RtmpGYlz5L/downloaded_packages/ROracle_1.3-1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ROracle’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\admin\AppData\Local\Temp\RtmpGYlz5L\downloaded_packages’
I've installed Rtools Rtools33.exe and my R version is version.string R version 3.3.2 (2016-10-31)
please help to connect it with oracle 11g database
Oracle client is intalled in d drive which path is:
D:\app\admin\product\11.2.0\client_1\BIN
As #Nathan Dobie mentionned, instructions on the ROracle installation were helpful for me. I didn't need Rtools.exe but i had to add oracle instant client in the Environment variables.
Configuration in 64bits:
Under System variables, create OCI_LIB64 if it does not already exist.
Set the value of OCI_LIB64 to D:\app\admin\product\11.2.0\client_1\BIN (in your case)
Under System variables, edit PATH to include
D:\app\admin\product\11.2.0\client_1\BIN
And you will also need to create OCI_INC with the following value
D:\app\admin\product\11.2.0\client_1\oci\include
Worked very well for me :-)

Resources