Problem with library(Rdimtools) for Windows

Hi Posit Community,

I'am trying to install the package "Rdimtools" for unsupervised feature selection.
I have this error:

Error: package or namespace load failed for ‘Rdimtools’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘shapes’

According to this message, I was triying to install the package "shapes" and this was the output:

Error in library.dynam(dynlib, pkg, lib) :
DLL 'rgl' not found: maybe not installed for this architecture?
Error: package or namespace load failed for 'shapes':
.onLoad failed in loadNamespace() for 'rgl', details:
call: NULL
error: Loading rgl's DLL failed.

I already have installed the "rgl" package at my active packages. Who knows how to handle this kind of error?

Thanks!!

rgl might have system dependencies for its full functionality ?

OpenGL and GLU Library (Required for display in R. See "Installing OpenGL support" in README.md. Not needed if only browser displays using rglwidget() are wanted.), zlib (optional), libpng (>=1.2.9, optional), FreeType (optional), pandoc (>=1.14, needed for vignettes)

nirgrahamuk
You are explaining if I used the "dependencies= TRUE " during the installation of required packages?
I have been trying with this code and it doesn't effect

install.packages("shapes",dependencies = TRUE)
install.packages("rgl",dependencies = TRUE)
install.packages("alphashape3d",dependencies = TRUE)

No, that dependencies param relates to package dependencies. But this would be a system dependency
but now I'm thinking maybe your rgl just simply didnt install as it should have ?
Can you show the output of you installing rgl, and how its ok installed message looks ?

can you tell what operating system you use; according to the readme, for windows it would just work; if linux/mac you may need to do more.

## REQUIREMENTS

**For OpenGL display:**

Windowing System (unix/x11 or Windows)  
OpenGL Library  
OpenGL Utility Library (GLU)

**For WebGL display:**

A browser with WebGL enabled. See <https://get.webgl.org>.

## Installing OpenGL support

**Debian and variants including Ubuntu:**

    aptitude install libgl1-mesa-dev libglu1-mesa-dev

**Fedora:**

    yum install mesa-libGL-devel mesa-libGLU-devel libpng-devel

**macOS:**

Install XQuartz.  
`rgl` should work with XQuartz 2.7.11 or newer, but it will probably
need rebuilding if the XQuartz version changes. XQuartz normally needs
re-installation whenever the macOS version changes.

**Windows:**

Windows normally includes OpenGL support, but to get the appropriate
include files etc., you will need the appropriate version of
[Rtools](https://cran.r-project.org/bin/windows/Rtools/) matched to your
R version.

nirgrahamuk thank you for your time.

I reinstalled the rgl package again and an error appeared. I share the output in the console of RStudio:

Error : package 'rgl' is not installed for 'arch = i386'
Error: loading failed
Ejecución interrumpida
*** arch - x64
Warning: package 'geometry' was built under R version 4.0.5
Warning: package 'rgl' was built under R version 4.0.3
ERROR: loading failed for 'i386'

  • removing 'C:/Users/nicolas ayala/Documents/R/win-library/4.0/alphashape3d'
    Warning in install.packages :
    installation of package ‘alphashape3d’ had non-zero exit status

With the idea of share my session info with you; I also have tryied to install the package "sessioninfo" and it show me this error. I don't know if they two errors ('rgl' and 'sessioninfo') are linked.

  • installing source package 'cli' ...
    ** package 'cli' successfully unpacked and MD5 sums checked
    ERROR: cannot remove earlier installation, is it in use?
  • removing 'C:/Users/nicolas ayala/Documents/R/win-library/4.0/cli'
  • restoring previous 'C:/Users/nicolas ayala/Documents/R/win-library/4.0/cli'
    Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
    problema al copiar C:\Users\nicolas ayala\Documents\R\win-library\4.0\00LOCK-cli\cli\libs\x64\cli.dll a C:\Users\nicolas ayala\Documents\R\win-library\4.0\cli\libs\x64\cli.dll: Permission denied
    Warning in install.packages :
    installation of package ‘cli’ had non-zero exit status

Thank you in advance!

lets start at the first step. You are windows OS user;
You will need Rtools (its not a package but a utility for your system)
do you have Rtools ?
https://cran.r-project.org/bin/windows/Rtools/

1 Like

Yes, I have Rtools.

What did I was uninstall R, RStudio and Rtools. I made sure to remove all libraries and dependencies.
Then I installed R, RStudio and Rtools again. Finally, the package "Rdimtools" and "sessioninfo" were installed succesfully. I attach the console output of install.packages("Rdimtools"). I realized that associated packages were installed correctly

package ‘fs’ successfully unpacked and MD5 sums checked
package ‘rappdirs’ successfully unpacked and MD5 sums checked
package ‘sass’ successfully unpacked and MD5 sums checked
package ‘cachem’ successfully unpacked and MD5 sums checked
package ‘memoise’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘lifecycle’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘bslib’ successfully unpacked and MD5 sums checked
package ‘fontawesome’ successfully unpacked and MD5 sums checked
package ‘jquerylib’ successfully unpacked and MD5 sums checked
package ‘stringr’ successfully unpacked and MD5 sums checked
package ‘tinytex’ successfully unpacked and MD5 sums checked
package ‘yaml’ successfully unpacked and MD5 sums checked
package ‘rmarkdown’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘fastmap’ successfully unpacked and MD5 sums checked
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘evaluate’ successfully unpacked and MD5 sums checked
package ‘highr’ successfully unpacked and MD5 sums checked
package ‘xfun’ successfully unpacked and MD5 sums checked
package ‘htmlwidgets’ successfully unpacked and MD5 sums checked
package ‘htmltools’ successfully unpacked and MD5 sums checked
package ‘knitr’ successfully unpacked and MD5 sums checked
package ‘jsonlite’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked
package ‘base64enc’ successfully unpacked and MD5 sums checked
package ‘mime’ successfully unpacked and MD5 sums checked
package ‘iterators’ successfully unpacked and MD5 sums checked
package ‘bit’ successfully unpacked and MD5 sums checked
package ‘minpack.lm’ successfully unpacked and MD5 sums checked
package ‘scatterplot3d’ successfully unpacked and MD5 sums checked
package ‘rgl’ successfully unpacked and MD5 sums checked
package ‘doParallel’ successfully unpacked and MD5 sums checked
package ‘foreach’ successfully unpacked and MD5 sums checked
package ‘R6’ successfully unpacked and MD5 sums checked
package ‘bit64’ successfully unpacked and MD5 sums checked
package ‘gmp’ successfully unpacked and MD5 sums checked
package ‘Rmpfr’ successfully unpacked and MD5 sums checked
package ‘ECOSolveR’ successfully unpacked and MD5 sums checked
package ‘scs’ successfully unpacked and MD5 sums checked
package ‘osqp’ successfully unpacked and MD5 sums checked
package ‘RcppEigen’ successfully unpacked and MD5 sums checked
package ‘rbibutils’ successfully unpacked and MD5 sums checked
package ‘Rtsne’ successfully unpacked and MD5 sums checked
package ‘labdsv’ successfully unpacked and MD5 sums checked
package ‘shapes’ successfully unpacked and MD5 sums checked
package ‘fastcluster’ successfully unpacked and MD5 sums checked
package ‘dbscan’ successfully unpacked and MD5 sums checked
package ‘pracma’ successfully unpacked and MD5 sums checked
package ‘ADMM’ successfully unpacked and MD5 sums checked
package ‘CVXR’ successfully unpacked and MD5 sums checked
package ‘RANN’ successfully unpacked and MD5 sums checked
package ‘Rcpp’ successfully unpacked and MD5 sums checked
package ‘RcppDE’ successfully unpacked and MD5 sums checked
package ‘Rdpack’ successfully unpacked and MD5 sums checked
package ‘RSpectra’ successfully unpacked and MD5 sums checked
package ‘maotai’ successfully unpacked and MD5 sums checked
package ‘mclustcomp’ successfully unpacked and MD5 sums checked
package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
package ‘RcppDist’ successfully unpacked and MD5 sums checked
package ‘Rdimtools’ successfully unpacked and MD5 sums checked

#Loading "Rdimtools" Library

library(Rdimtools)
** ------------------------------------------------------- **
** Rdimtools || Dimension Reduction and Estimation Toolbox
**
** Version : 1.1.2 (2023)
** Maintainer : Kisung You (kisungyou@outlook.com)
** Website : Dimension Reduction and Estimation Methods • Rdimtools
**
** Please see 'citation('Rdimtools)' to cite the package.
** ------------------------------------------------------- **

After doing some tests, I noticed that I was having this problem too "Updating Loaded Packages - One or more of the packages that will be updated by installation are currently loaded. Restarting R prior to updating these packages is strongly recommended". I looked for some solution ideas from this link:
"installed-packages-endless-loop-updating-loaded-packages-one-or-more"

Perhaps updating the packages would have been the final solution (as the main recommendation of mentioned link) but the process was taking two hours so I opted for the idea of ​​reinstalling everything again as I indicated at the beginning (It finally took about 20 minutes in total).

Thank you for your help and share your ideas nirgrahamuk

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.