0

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'
Pere
  • 706
  • 1
  • 7
  • 21
Shawn
  • 1
  • 1
  • 1
    What is your R version? – nrussell Dec 29 '15 at 18:45
  • Do you have pkg:RODBC and needed dependencies installed? (It's not on CRAN for Mavericks+ versions of OSX.) – IRTFM Dec 29 '15 at 22:42
  • I updated R to 3.2.3 and installed the RODBC package. Still getting same errors. Any idea what the .onattach/namespace issue is about? – Shawn Jan 04 '16 at 00:36
  • There are multiple package dependencies for RcmdrPlugin.BCA. Have you checked that they are all met. I was able to install but not able to load that package in a current version of R Rcmdr and OSX. I am asked if I want to load and restart Rcmdr and what I pick 'restart' I get an error at the R console. I'm a command-line user of R, not a menu pulldown-user, so this doesn't bother me. – IRTFM Mar 09 '16 at 01:49

2 Answers2

1

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.

1

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

A P
  • 11
  • 2