bigRF asking for R version 3.1 - r

There's a similar question out there (How do I install an older R package?), but in my instance, bigRF installs, but then I get an error when I try to load it. What's interesting is that the other SO post indicates that bigRF only works in previous versions of R, while the error is saying that I need a future version of r (3.1) than the current version (3.0.2).
library(bigrf)
Loading required package: bigmemory
Loading required package: bigmemory.sri
Loading required package: BH
bigmemory >= 4.0 is a major revision since 3.1.2; please see packages
biganalytics and and bigtabulate and http://www.bigmemory.org for more information.
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/bigrf/libs/bigrf.so': dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/bigrf/libs/bigrf.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/bigrf/libs/bigrf.so
Reason: Incompatible library version: bigrf.so requires version 3.1.0 or later, but libR.dylib provides version 3.0.0
In addition: Warning message:
package ‘bigrf’ was built under R version 3.1.0
Error: package or namespace load failed for ‘bigrf’
Thoughts on how to resolve?

Yep, looks like install.packages("bigrf", type="source") works.

Related

difficulty loading packages in R

I have spent hours trying to think of a ways to install some packages in R that just refuse to load. I have tried uninstalling and installing again, downloading from URL etc etc. but nothing seems to work. Please help me before I give up on teach entirely
{
library(psych)
Error: package or namespace load failed for ‘psych’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/alan/Library/R/3.5/library/lattice/libs/lattice.so':
dlopen(/Users/alan/Library/R/3.5/library/lattice/libs/lattice.so, 6): Library not loaded: #rpath/R/lib/libR.dylib
Referenced from: /Users/alan/Library/R/3.5/library/lattice/libs/lattice.so
Reason: Incompatible library version: lattice.so requires version 3.5.0 or later, but libR.dylib provides version 3.1.0
I had a previous version of R installed so found the directory a directory full of libraries that must have been clashing. I just deleted the whole folder and went from scratch

Incompatible library version RSiena

I'm trying to load the RSiena package into R, but keep getting this error message:
Error: package or namespace load failed for ‘RSiena’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libfontconfig.1.dylib
Referenced from: /usr/local/lib/libtk8.6.dylib
Reason: Incompatible library version: libtk8.6.dylib requires version 11.0.0 or later, but libfontconfig.1.dylib provides version 10.0.0
I tried installing three ways:
install.packages("RSiena") , install.packages("RSiena", repos="http://R-Forge.R-project.org") , and installing straight from tgz file (from https://cran.r-project.org/web/packages/RSiena/index.html).
The first two installation methods do not give any error and say The downloaded binary packages are in /var/folders/mk/__r_sbzn5mx88x04mrlycsg00000gq/T//RtmpbxlMY8/downloaded_packages.The third option gives this message Error in install.packages : type == "both" cannot be used with 'repos = NULL'
None allow me to load the package. I'm working with R version 3.4.3 (2017-11-30) in RStudio Version 1.1.423 on Mac OS X El Capitan (version 10.11.6).
I've tried uninstalling and reinstalling. I'm not sure how else to troubleshoot this issue.
The most recent version (RSiena v.1.2.26) of rsiena addresses tcltk issues, and is now available on Github here: https://github.com/snlab-nl/rsiena.
SOLUTION. I installed XQuartz from xquartz.macosforge.org and now the package loads successfully.

Rcmndr plugin not running

I am trying to run this rcmndr plugin for my class and it's not working. I installed all the necessary packages and it appeared to install correctly but I am getting this package or namespace load failure. The GUI appears for a split second when I enter the library command, then disappears with the error. It seems to be an issue with the namespace and .onattach but I couldn't find any existing answers or resources for this issue.
https://cran.r-project.org/web/packages/RcmdrPlugin.BCA/index.html
> library(RcmdrPlugin.BCA)
Loading required package: Rcmdr
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: sandwich
Rcmdr Version 2.2-3
Loading required package: BCA
Warning: package 'BCA' was built under R version 3.2.3
Loading required package: flexclust
Warning: package 'flexclust' was built under R version 3.2.3
Loading required package: grid
Loading required package: lattice
Loading required package: modeltools
Loading required package: stats4
Error : .onAttach failed in attachNamespace() for 'RcmdrPlugin.BCA', details:
call: get(Menus[m, 5])
error: object 'importRODBCtable' not found
In addition: Warning messages:
1: package ‘RcmdrPlugin.BCA’ was built under R version 3.2.3
2: package ‘Rcmdr’ was built under R version 3.2.3
3: package ‘RcmdrMisc’ was built under R version 3.2.3
4: package ‘car’ was built under R version 3.2.3
Error: package or namespace load failed for 'RcmdrPlugin.BCA'
I got alternative to run this plugin in R commander.
Open R Commander by using:
library(Rcmdr)
R Commander dialogue box will appear.
In R Script load BCA library-
lapply(list('BCA', 'splines', 'RcmdrMisc', 'car', 'sandwich', 'flexclust', 'grid','lattice','modeltools','stats4','RODBC'), require, character.only = TRUE)
Click on Submit button.
If you don't have RODBC package (which is not there in my case), install it separately and then run above commands. To install use:
install.packages("RODBC")
And now you exactly have what you will get after loading RcmdrPlugin.BCA library.
I faced a similar situation. Having tried a bunch of things - none worked - I finally uninstalled R and deleted the remaining files from under the "Program Files" directory in Windows. I then reinstalled R and RcmdrPlugin.BCA and this time it worked.
You could also refer to this URL for help http://r.789695.n4.nabble.com/Unable-to-run-RcmdrPlugin-survival-using-3-2-2-with-Windows-10-td4711796.html

R libraries won't load after upgrading

I upgraded my R version today from 3.1 to 3.2. In doing so, I kept a copy of my original libraries in a separate folder. After installing version 3.2, I pasted the libraries in the libraries folder of R 3.2.
After doing so, I upgraded Bioconductor, and updated all its packages.
However, when I try to load some (not all) bioconductor packages right now in R, I get the following error:
library(ballgown)
Error : .onLoad failed in loadNamespace() for 'XML', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Users/user/Library/R/3.2/library/XML/libs/XML.so':
dlopen(/Users/user/Library/R/3.2/library/XML/libs/XML.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/3.1/Resources/lib/libR.dylib
Referenced from: /Users/user/Library/R/3.2/library/XML/libs/XML.so
Reason: image not found
Error: package or namespace load failed for ‘ballgown’
It looks like he's still looking for something in the older 3.1 version, but I deleted that folder.
Here is my library path in R:
.libPaths()
[1] "/Users/user/Library/R/3.2/library"
[2] "/Library/Frameworks/R.framework/Versions/3.2/Resources/library"
Remarkably, when loading the same packages in RStudio, the error does not pop up. How can I still fix this?
Thanks.

Unable to load caret package in R on R 3.1.0 on OSX 10.9

I installed the R caret package using install.packages command and did library(caret). I am recieving the following error
>library(caret)
Loading required package: lattice
Loading required package: ggplot2
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.6.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so
Reason: image not found
Error: package or namespace load failed for ‘caret’
I searched other posts and also installed OSX tcltk package from http://cran.us.r-project.org/bin/macosx/tools/ but it still does not seem to work. I also installed tcltk2 package from R but still does not work.. Kindly help
I have met the same problem with the same error message but unfortunately, just reinstalling R1.3 didn't solve the problem for me.
To solve it, I had to install X-Quartz as explained here in the "Mac OS X Trouble-shooting" section and the problems related to tcltk.
Do this and it will resolve the problem
install.packages("quantreg")
What version of R are you using? Do you use Mavericks? You may need to update to a version which includes Mavericks updates.
http://cran.r-project.org/bin/macosx/
I had the same issue. Reinstalling Quartz solved the issue
Try this, worked for me.
install.packages("caret", dependencies = T)
Once that is done, run
install.packages("pbkrtest", dependencies = T)

Resources