rJava installation from local directory in windows - r

I installed R 2.11.1 and am running java 1.7.0
I downloaded the rJava source file rJava_0.8-8.zip from
http://cran.us.r-project.org/bin/windows/contrib/2.11/
and ran install.packages("rJava_0.8-8.zip",repos=NULL,type="source") in R from the directory containing the file. But I am getting the following lines as error:
Warning in install.packages("rJava_0.8-8.zip", repos = NULL, type = "source") :
argument 'lib' is missing: using 'C:\Users\Shiladitya\Documents/R/win64-library/2.11'
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :
object 'unpackPkgZip' not found
Warning message:
In install.packages("rJava_0.8-8.zip", repos = NULL, type = "source") :
installation of package 'rJava_0.8-8.zip' had non-zero exit status
I'm being unable to install rJava the usual way by doing
install.packages('rJava', .libPaths()[1], repos="http://cran.us.r-project.org")
since that is leading to an error message like this:
Warning: unable to access index for repository http://cran.us.r-project.org/bin/windows64/contrib/2.11
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘rJava’ is not available
Please help!

Related

unable to access index for repository https://macos.rbind.org/src/contrib

I am trying to install rattle on macOS (Link):
system('brew install gtk+')
local({
if (Sys.info()[['sysname']] != 'Darwin') return()
.Platform$pkgType = 'mac.binary.el-capitan'
unlockBinding('.Platform', baseenv())
assign('.Platform', .Platform, 'package:base')
lockBinding('.Platform', baseenv())
options(
pkgType = 'both', install.packages.compile.from.source = 'always',
repos = 'https://macos.rbind.org'
)
})
install.packages(c('RGtk2', 'cairoDevice', 'rattle'))
But I am getting the following error:
Warning in install.packages :
unable to access index for repository https://macos.rbind.org/src/contrib:
cannot open URL 'https://macos.rbind.org/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository https://macos.rbind.org/src/contrib:
cannot open URL 'https://macos.rbind.org/src/contrib/PACKAGES'
Warning in install.packages :
packages ‘RGtk2’, ‘cairoDevice’, ‘rattle’ are not available (for R version 3.6.2)
Warning in install.packages :
unable to access index for repository https://macos.rbind.org/bin/macosx/el-capitan/contrib/3.6:
cannot open URL 'https://macos.rbind.org/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Looking at the above error, it is supersing that I see:
packages ‘RGtk2’, ‘cairoDevice’, ‘rattle’ are not available (for R version 3.6.2)
While I installed rattle on Windows based on R 3.6.2.
It would appear that macos.rbind.org is no longer active. Perhaps try macos.rbind.io. That is, replace
repos = 'https://macos.rbind.org'
with
repos = 'https://macos.rbind.io'

Installing geoR on Ubuntu 16.04

I'm having issues installing the geoR package on ubuntu 16.04, when I run
>install.packages('geoR', dependencies = TRUE)
I get the following error message
/usr/lib/R/etc/Makeconf:141: recipe for target 'RFoptions.o' failed
make: *** [RFoptions.o] Error 1
ERROR: compilation failed for package ‘RandomFieldsUtils’
* removing ‘/home/luca/R/x86_64-pc-linux-gnu-library/3.2/RandomFieldsUtils’
The downloaded source packages are in
‘/tmp/Rtmph5zmhR/downloaded_packages’
Warning message:
In install.packages("RandomFieldsUtils") :
installation of package ‘RandomFieldsUtils’ had non-zero exit status
>
> install.packages('geoR', dependencites = TRUE)
Installing package into ‘/home/luca/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘RandomFieldsUtils’, ‘RandomFields’
Error in download.file(url, destfile, method, mode = "wb", ...) :
unused argument (dependencites = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘RandomFieldsUtils’ failed
Error in download.file(url, destfile, method, mode = "wb", ...) :
unused argument (dependencites = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘RandomFields’ failed
Error in download.file(url, destfile, method, mode = "wb", ...) :
unused argument (dependencites = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available, :
download of package ‘geoR’ failed
It seems to me that the issue is with the RandomFieldsUtils package, and also when I try to run
>install.packages('RandomFieldsUtils')
I get the same error
/usr/lib/R/etc/Makeconf:141: recipe for target 'RFoptions.o' failed
make: *** [RFoptions.o] Error 1
ERROR: compilation failed for package ‘RandomFieldsUtils’
* removing ‘/home/luca/R/x86_64-pc-linux-gnu-library/3.2/RandomFieldsUtils’
The downloaded source packages are in
‘/tmp/Rtmph5zmhR/downloaded_packages’
Warning message:
In install.packages("RandomFieldsUtils") :
installation of package ‘RandomFieldsUtils’ had non-zero exit status
I'm pretty new to R and tried this both in R Studio and in the Ubuntu console, got the same message twice.
Any idea how to fix it?
thanks in advance
After playing around a bit, I managed by downloading the second-to-latest version of RandomFieldsUtils (i.e. 0.3.16 instead of 0.3.20) directly from the contributor's website and installing it from the package.
Posting this answer to myself in case it can help anybody!

Install old version of DBI in R (2.5.0)

How to install DBI with R (version 2.5(windows))? I am unable to install DBI (0.2)
I used:
install.packages("DBI", repos="http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz")
It gives error:
Warning in install.packages("DBI", repos = "http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz") :
argument 'lib' is missing: using 'C:\Users\USER\Documents/R/win-library/2.7'
Warning: unable to access index for repository http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz/bin/windows/contrib/2.7
Warning message:
package ‘DBI’ is not available
If i used the process used in the here(suggest as a duplicate question).
I get this error:
install.packages("http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz",repos=NULL, type="source")
Warning in install.packages("http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz", :
argument 'lib' is missing: using 'C:\Users\USER\Documents/R/win-library/2.7'
Can't locate R/Dcf.pm in #INC (#INC contains: C \PROGRA~2\R\R-27~1.0\share\perl; /usr/lib/perl5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) at C:\PROGRA~2\R\R-27~1.0/bin/INSTALL line 23.
BEGIN failed--compilation aborted at C:\PROGRA~2\R\R-27~1.0/bin/INSTALL line 23.
Warning message:
In install.packages("http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz", :
installation of package 'http://cran.r-project.org/src/contrib/Archive/DBI/DBI_0.2-0.tar.gz' had non-zero exit status
How to install old version of DBI in R?

Installing local package on R 3.2.2 failed

Installing an old version of caret on my custom R version was a burden.
I tried using the RStudio installation tool, but failed
I tried the command:
pathToFile <- "C:/Users/Fsociety/Desktop/caret_5.17-7.tar"
install.packages(pathToFile,repos = NULL, type = "source")
I got this error:
Warning: invalid package 'C:/Users/Fsociety/Desktop/caret_5.17-7.tar'
Error: ERROR: no packages specified
Warning in install.packages :
running command '"C:/PROGRA~1/RRO/RRO-32~1.0/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Fsociety\Documents\R\win-library\3.2" "C:/Users/Fsociety/Desktop/caret_5.17-7.tar"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/Fsociety/Desktop/caret_5.17-7.tar’ had non-zero exit status
Is there any thing wrong with the install.package that I can fix?

Build R package on Mac for Windows

I develop a package under Mac and want to distribute it to my colleagues. I can build the package under Mac and can install it under Mac and 'most' of my colleagues Windows PCs. Some of these are Windows 7 and some are Windows 8. All of them use RStudio and different R Versions all above 3.1.
I have now one big Problem with one computer and can not figure out what to do.
When I try to install the package, I get the following message
install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz", repos = NULL, type = "source", lib="\\fs02/ncasasvi$/Dokumente/R/R-3.1.2/library")
Warning in install.packages :
'lib = "\fs02/ncasasvi$/Dokumente/R/R-3.1.2/library"' is not writable
'\\fs02\ncasasvi$\Dokumente'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
'\\fs02\ncasasvi$\DOKUME~1\R\R-31~1.2' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"//fs02/ncasasvi$/DOKUME~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "\\fs02\ncasasvi$\Dokumente\R\win-library\3.1" "C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz"' had status 1
Warning in install.packages :
installation of package 'C:/Users/ncasasvi/Downloads/imbproteomicsr_0.1.6.tar.gz' had non-zero exit status
I copied now the complete package source, so all folders and files, to a Windows machine, installed Rtools and devtools there and build the package on the windows machine with the same problem...
Is there a way to geht a more precise error message, not just status one? I have no further Ideas.
I also sensed my file to win builder. It reported no error messages, but I also didn't got a 'new build package' from the website.
Hope some of you have some suggestions. Thanks in advance!
EDIT:
After changing the path to something without \\ at the beginning and trying to get rid of all the other error messages, I got this message:
> install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz", repos = NULL, type = "source", lib=('U:/Dokumente/R/win-library/'))
Error: ERROR: no packages specified
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "U:\Dokumente\R\win-library\" "C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/ncasasvi/Downloads/imbproteomicsr_latest.tar.gz’ had non-zero exit status
In between, I had a partly success, but it still could not install the package. This was the output in between:
> install.packages("C:/Users/ncasasvi/Downloads/imbproteomicsr_latest (2).tar.gz", repos = NULL, type = "source")
Installing package into ‘\\fs02/ncasasvi$/Dokumente/R/win-library/3.1’
(as ‘lib’ is unspecified)
'\\fs02\ncasasvi$\Dokumente'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'imbproteomicsr' ...
** R
** data
*** moving datasets to lazyload DB
** 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) :
no library trees found in 'lib.loc'
Error: loading failed
Execution halted
*** arch - x64
Warning in library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE) :
no library trees found in 'lib.loc'
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing '\\fs02/ncasasvi$/Dokumente/R/win-library/3.1/imbproteomicsr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "\\fs02\ncasasvi$\Dokumente\R\win-library\3.1" "C:/Users/ncasasvi/DOWNLO~1/imbproteomicsr_latest (2).tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/ncasasvi/DOWNLO~1/imbproteomicsr_latest (2).tar.gz’ had non-zero exit status

Resources