How to install BigMemory and bigrf on windows OS - r

I have been trying to install bigmemory on my R installation.
My OS is windows 7 64 bit and I have tried it on R V2.15.1,2.15.2 and 3.0.1 64 bit but I cant get it to work.
I have tried several options
download the current source and run the command in R v3.0.1
install.packages("D:/Downloads/bigmemory_4.4.3.tar.gz", repos =
NULL, type="source")
but this gives an error "ERROR: Unix-only
package"
download older sources and run a similar commands, in the various
installations of R V2 V3 etc,
This gives me an error "ERROR:
configuration failed for package 'bigmemory'"
Any ideas? I am actually trying to install bigrf but bigmemory seems to be a dependency. Is there any workaround for this?
Many thanks

Seems the github version installs OK on Windows:
install.packages(c("BH","biglm"))
library(devtools)
devtools::install_github('kaneplusplus/bigmemory')
library(bigmemory)
the package authors told me they are fixing the CRAN one to work on Windows again too.

Going to the CRAN page here, shows you that you have to compile the sources on windows. Google how to do it or look at official document : here
Of course if package A depends on B you have to install B before A yourself.
EDIT: actually it says OS_type : unix

Related

Having Issues installing tabulizer package in R

I had a script working with tabulizer, but had to clean my hard drive and reinstall R, and now I cant seem to even download and access the tabulizer library. I am now using R version 4.1.2 64 bit, and am thinking maybe I need to use an earlier version of R??? Here is the error message I get when I try and install tabulizer.
install.packages("tabulizer")
Installing package into ‘C:/Users/cdonner/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘tabulizer’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
I have tried to go to go to Cran (https://cran.r-project.org/src/contrib/Archive/tabulizer/) and download and unzip the libraries to my directory, but then I get an errors again. Any ideas? Thanks.
Enter this into the command window!
remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")
It is not on CRAN.
You have to install using
ghit::install_github("ropensci/tabulizer")
or
devtools::install_github("ropensci/tabulizer")
github
I have just come to dealing with the same problem, but I got to solve it through the following steps:
the tabulizer package requires a Java environment. You need to download Java 64-bit or Java 32-bit through.
Make sure before that your windows/ mac is 32 bit or 64 bit by using the function sessionInfo().
Install the rJava package in R.
Create the Java environment through the command: Sys.setenv(JAVA_HOME="C:/Program Files/Java/jdk-18/")
Attention: the path of the file in step 3 is for java 64. the path for java 32 would be Sys.setenv(JAVA_HOME="C:/Program Files (x86)/Java/jdk-18/").
The other thing is that jdk-18 changes depending on everylaptop, in my case it is jdk-18, in your case it could jdk-17 for example.
Finally activate the library: library(rJava)
Voila. rJava and tabulizer work smoothly and nicely.
Got the same problem. (A lot) Packages were missing
I had to update R
Install java for R
Install Rtools42 from CRan
Install remotes
before running the command of #Dunbar111
remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")

Installing local binary packages using R CMD INSTALL on a Mac

I came across a package that is not available on CRAN. I tried to install the package using:
Packages & Data > Package Installer > Local Binary Package > At User
Level > [FileName.tgz] > Install...
This didn't work and I am now trying to use the R CMD INSTALL command. However, it seems I need to run that command in the command line interface but I cannot get it to install properly.
The package I'm trying to install is called gEcon. It can be found here. In particular, I am getting the following error message after "installing" the package:
Error: package or namespace load failed for ‘gEcon’:
package ‘gEcon’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
I assume it's the way I'm installing it.
Thanks in advance.
You're going to need to install Xcode apparently, because you've got to install this from source per these directions:
Now, you've gotta update R to the latest stable release, or if you prefer you can find the exact minimum newest version needed for gEcon.
After upgrading R you can complete the installation from source.
Original answer to original question:
Two things:
To access the command line and use R CMD on an Apple computer, please use the terminal.app app. Please see this for more details.
An easier and probably better approach is to install your package from the author's Github (or BitBucket, etc) repository using devtools::install_github or just use devtools::install on the downloaded source project.

Unix-only package error in R

I'm trying to build the R package bigmemory for Windows 8 x64. However, when running R CMD INSTALL --build bigmemory_4.4.3.tar.gz, I receive the error ERROR: Unix-only package. I do not know why this is happening, but my guess is that it has something to do with the configure file of the package. I'm using R 3.0.1, 64 bit.
See this link, Windows support has been suspended. It's not your R-version, if you want to make use of it you'll have to use cygwin or install a Linux partition. You can also try the package ff.
The bigmemory NEWS, says "Windows support is temporarily suspended due to issues with the Boost headers." for the most current version of bigmemory.
The package you mention in the comments doesn't depend on a specific version of bigmemory, so you could try to build one of the older versions of bigmemory from the archive.

R: can rpm files be used with Windows for possibly outdated R packages?

I was trying to run code that required the R packages ‘pkgDepTools’ and ‘Rgraphviz’. I received error messages saying that neither package is available for R version 2.15.0.
A Google search turned up the following webpage RPM Pbone that seems to have the packages:
http://rpm.pbone.net/index.php3/stat/4/idpl/17802118/dir/mandrake_other/com/R-pkgDepTools-1.20.0-1-mdv2012.0.i586.rpm.html
and
http://rpm.pbone.net/index.php3/stat/4/idpl/17802080/dir/mandrake_other/com/R-Rgraphviz-1.32.0-2-mdv2012.0.i586.rpm.html
However, the files have an *.rpm extension rather than the *.tar.gz or *.zip extensions I am used to.
I am using Windows 7 and R version 2.15.0. Can I install an R package from an *.rpm file?
From Wikipedia *.rpm seems like maybe it is more for Linux:
http://en.wikipedia.org/wiki/RPM_Package_Manager
Regarding other possible solutions, I have found several earlier posts here with similar questions about installing R packages that are not available for the most recent version of R:
Bivariate Poisson Regression in R?
Package ‘GeneR’ is not available
R Venn Diagram package Venerable unavailable - alternative package?
I have installed the latest version of Rtools and the package 'devtools'. Although I know nothing about them.
There is an archived version of 'Rgraphviz' here:
http://cran.r-project.org/src/contrib/Archive/Rgraphviz/
but I cannot locate an archived version of 'pkgDepTools'.
If I can install the packages on a Windows machine using the above *.rpm files could someone please provide instructions?
If I must use Rtools to build them I might ask more questions because the instructions at the link below are challenging for me:
http://cran.r-project.org/doc/manuals/R-admin.html#Building-from-source
To be completely transparent I am hoping someone might build them for me, if that is possible. Although I recognize the experience and knowledge gained from doing it myself would probably pay off in the long run.
Thank you for any advice.
pkgDepTools and Rgraphviz are BioConductor R packages not ones hosted on CRAN. Unless you configure your R to download packages from those repos, R will report that they are not available; it can only install from repos it has been configured to install from.
To install those BioConductor packages a lite installation method is provided:
source("http://bioconductor.org/biocLite.R")
biocLite(c("pkgDepTools", "Rgraphviz"))
Further details are provided on the Install page of the BioConductor website
In general you can't use rpm packages on Windows; rpm's are the equivalent of a binary package for Linux. Any C/C++/Fortran/etc code will have been compiled for Linux not Windows. If a package really isn't available for your version of R then check if there is a reason stated on CRAN (usually Windows binaries take a few days longer to produce or there may be requirements for software not available on the CRAN Windows build machines). You can try the WinBuilder service run by Uwe Ligges to build Windows Binaries of packages for you, but if the package was on CRAN and now isn't that suggests it no longer works with current R and can not be built.
In general try a wider search for packages; the first hit in my Google search results under the search string "pkgDepTools" is the Bioconductor page for the package which includes a link to the Windows binary and instructions on how to install the package from within R.
I think this merits an answer rather than a comment.
A gentleman at Bioconductor helped me get Rgraphviz installed. The primary problem was that the version of Rgraphviz I had downloaded only seems to work with the 32-bit version of R and I was running a 64-bit version of R. I was able to install Rgraphviz in the 32-bit version of R.
I had also made an error or two in the PATH statement during some of my attempts to install Rgraphviz. However, the post above in my second comment provides the instructions for installation.
You just, it seems, cannot install the normal download version of Rgraphviz in the 64-bit version of R.
I think many of our emails back and forth are now posted on the Bioconductor forum.
I might edit this answer with more detailed instructions in the next 24-hours.

R: RGraphviz installation

I've been trying to install the library using brute force - trying different combinations of the things people have posted in mailing lists (I'm too lazy to list them out one by one, but I think I tried the most of them. I can list that too if it helps anyone.). The results have varied from a harmless message of a missing dll to RGui not being able to start before I remove the library manually. Nevertheless, I haven't succeeded...
Do you know how to install it properly, so that it works? I'm running 64bit Windows 7 and I'm not keen of compiling packages from source. Thanks!
Install Rgraphviz 2.2.1 from Bioconductor
According to the latest README:
Rgraphviz now comes bundles with Graphviz. This should greatly simplify
installation on all platforms, compared with earlier versions.
Bioconductor 2.11 contains a lot of libraries that you might not want or need, but it does seem to be the easiest path to achieving what you want. These are the instructions on the Rgraphviz homepage:
source("http://bioconductor.org/biocLite.R")
biocLite("Rgraphviz")
These instructions work for R x64 2.15.2 on Windows 7
library("Rgraphviz")
Loading required package: graph
Loading required package: grid
set.seed(123)
V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, 0.2)
plot(g1)
The README inside the source package for RGraphviz contains very some pretty clear instructions.
I think it's a bit user-unfriendly to those who only want to install the binary package, to hint that they might also want to download and unpack a tar.gz file containing the complete source, in order to find some technical info .... which turns out to be absolutely crucial.
One word of warning. If you follow the installation instructions for Rgrahpviz precisely, things won't work. Installing the package graphviz edits the environment PATH, but incorrectly. I didn't notice and I bet lots of others missed it too.
Rgraphviz wants to look for the binary in ...;C:\Graphviz2.20\bin\;
BUT the graphviz install adds a path only as far as ;C:\Graphviz2.20\;.
You'll have to edit it. Older instructions suggest a manual edit anyway, but newer ones leave it to graphviz.
I have same problems to install Rgraphviz (for using it in Bayesian Network packages). I used to get brute force solutions, but, now I trying an other one described here in this page
maybe you had also tried. If you succeed in installing Rgraphviz, I will be grateful if you learn me how to do.
I am using R-Studio on Ubuntu 12.10 x64 and installed Rgraphviz from the BioC software repository. Hope this helps. Eg: http://www.biotricks.net/2012/03/rstudio-and-bioconductor.html
I don't know if you have managed to solve your problem 100% but my installation problem came with the R version. Rgraphiz is developed by Bioconductor and it seems to be outdated. However, I had to use it since I moved to a new company and they are using it in one of their shiny apps for whatever reason.
With that being said, I have a dirty solve that I came up with after a couple of days of struggling with it.
First I include a line in the code which seems to be needed since without that line the shiny app simply doesn't do anything after opening:
if(!requireNamespace('BiocManager', quietly = TRUE))
install.packages('BiocManager')
It's weird that it won't work otherwise.The above line is found on Bioconductor's site: https://www.bioconductor.org/packages/devel/bioc/html/Rgraphviz.html
The second thing you need to do only once is to run the biocLite command below in the R console to install the Rgraphviz package
source("http://bioconductor.org/biocLite.R")
biocLite("Rgraphviz")
The above command I found on another thread: R: RGraphviz installation
Hopefully this update will help you or anyone else.
Since with the version of R 3.6.1 the script http://bioconductor.org/biocLite.R returns this message " Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install " I solved the problem with the following steps:
Get the list of directories used by R to install libraries and
choose the one with write permissions using: .libPaths()
Installing the "BiocManager" library using: install.packages("BiocManager")
Installation of the library "bioconductor" by forcing the directory
with write permissions using: BiocManager::install("Rgraphviz", lib = "C:/Users/tizbet/Documents/R/win-library/3.6")
I worked on the following R installation:
platform x86_64-w64-mingw32, arch x86_64, os mingw32, system x86_64, mingw32, version.string R version 3.6.1 (2019-07-05)

Resources