Error while installing R Commander - r

library(Rcmdr)
Loading required package: RcmdrMisc
Error: package or namespace load failed for ‘RcmdrMisc’:
object ‘print.rcorr’ is not exported by 'namespace:Hmisc'
Error: package ‘RcmdrMisc’ could not be loaded

Or, as a temporary workaround until fixed: install old Version (r-oldrel) of Hmisc: https://cran.r-project.org/package=Hmisc

Related

loading the package ggh4x in error: Error: package or namespace load failed for ‘ggh4x’: object ‘cli_abort’ is not exported by 'namespace:cli'

whilst loading the ggh4 package in R version 2022.07.1.
I get the following error.
Error: package or namespace load failed for ‘ggh4x’:
object ‘cli_abort’ is not exported by 'namespace:cli'
What I tried:
Removing the ggh4 package and downloading it from github:
devtools::install_github("teunbrand/ggh4x")
Removing the cli package and downloading it from github:
devtools::install_github("teunbrand/ggh4x")
Thanks for any help!
I just had the same problem, you need to install the cli package first ! :)

Error in loading packages RcmrdMisc and tidyverse in R

I am having trouble with loading some packages in the R environment.
The following error message pops up for package RcmdrMisc
Loading required package: car
Loading required package: carData
Loading required package: sandwich
Error: package or namespace load failed for ‘RcmdrMisc’:
.onLoad failed in loadNamespace() for 'checkmate', details:
call: NULL
error: package ‘backports’ does not have a namespace
Also, I am getting a similar error for package tidyverse
Error: package or namespace load failed for ‘tidyverse’:
.onLoad failed in loadNamespace() for 'broom', details:
call: NULL
error: package ‘backports’ does not have a namespace
I have tried uninstalling the packages and reinstalling them. But the error persists.
I have installed dependencies for the respective packages.
I have downloaded the latest available updates for both R and RStudio, but to no avail.
What am I doing wrong? Is there any fix for this issue?

Errors in loading the "caret" library

I have initially successfully installed the caret package through
install.packages("caret")
But I have trouble in loading the "caret" library after the execution of the following code.
library (caret)
The following error code is generated :
*Loading required package: lattice
Error: package or namespace load failed for ‘lattice’:
package ‘grid’ does not have a namespace
Error: package ‘lattice’ could not be loaded*
How to resolve this issue?
The problem has been resolved by doing:
> install.packages("caret", dependencies = c("Depends", "Suggests"))

How to fix "package ‘RcmdrMisc’ is not available (for R version 3.4.4)" on Ubuntu 18.04

I am trying to run rcommander in Rstudio Version 1.2.5001, (I am on Ubuntu 18.04) when I launch
library(Rcmdr)
I get:
Error: package or namespace load failed for ‘RcmdrMisc’ in library.dynam(lib, package, package.lib):
shared object ‘haven.so’ not found
Error: package ‘RcmdrMisc’ could not be loaded
In addition: Warning message:
S3 methods ‘[.haven_labelled’, ‘[.haven_labelled_spss’, ‘as.data.frame.haven_labelled’, ‘as_factor.data.frame’, ‘as_factor.haven_labelled’, ‘as_factor.labelled’, ‘format.pillar_shaft_haven_labelled_chr’, ‘format.pillar_shaft_haven_labelled_num’, ‘is.na.haven_labelled_spss’, ‘print.haven_labelled’, ‘print.haven_labelled_spss’, ‘type_sum.haven_labelled’, ‘zap_formats.data.frame’, ‘zap_formats.default’, ‘zap_label.data.frame’, ‘zap_label.default’, ‘zap_labels.data.frame’, ‘zap_labels.default’, ‘zap_labels.haven_labelled’, ‘zap_labels.haven_labelled_spss’, ‘zap_missing.data.frame’, ‘zap_missing.default’, ‘zap_missing.haven_labelled’, ‘zap_missing.haven_labelled_spss’, ‘zap_widths.data.frame’, ‘zap_widths.default’ were declared in NAMESPACE but not found
trying install.packages("RcmdrMisc") I get:
Installing package into ‘/home/marco/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘RcmdrMisc’ is not available (for R version 3.4.4)
However If i try to install r-cran-rcmdrmisc (1.0-7-1) on my system with apt-get I get:
r-cran-rcmdrmisc is already the newest version (1.0-7-1).
I don't know what to do to fix the issue and run rcommander :(
Help?
Thank you all for your help. I was successfully able to update R (I think..) however now when I run library(Rcmdr)
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Error: package or namespace load failed for ‘car’ in readRDS(pfile):
cannot read workspace version 3 written by R 3.6.1; need R 3.5.0 or newer
Error: package ‘car’ could not be loaded
After restarting again Rstudio I got:
Error in readRDS(file) :
cannot read workspace version 3 written by R 3.6.1; need R 3.5.0 or newer
install.packages("rcmdr")
Installing package into ‘/home/marco/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘rcmdr’ is not available (for R version 3.4.4)
I am puzzled :/

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

Resources