I cannot load the VIM 4.7.0 package in RStudio

Error Information:

library("VIM", lib.loc="C:/Program Files/R/R-3.3.2/library")
Loading required package: colorspace
Loading required package: grid
Loading required package: data.table
data.table 1.10.4
  The fastest way to learn (by data.table authors): 
  Documentation: ?data.table, example(data.table) and browseVignettes("data.table")
  Release notes, videos and slides: http://r-datatable.com
Error in inDL(x, as.logical(local), as.logical(now), ...) :
  allocation failure in R_setPrimitiveArgTypes
In addition: Warning message:
package ‘VIM’ was built under R version 3.5.1
Error: package or namespace load failed for ‘VIM’

Description of issue -

Steps taken so far -
Located and downloaded correct package from: https://cran.r-project.org/bin/windows/contrib/3.5/VIM_4.7.0.zip

Copied the file to: C:\Program Files\R\R-3.3.2\library

Installed file using R 'install package from local files'

R confirms package is installed.

When opening the package in RStudio I get the above error information

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: v1.0.44
  • OS Version: Win7 32-bit
  • R Version: 3.3.2

you are using an old version of R with a binary package built under a newer version (3.5). Not a good idea because you can run into issues like you are now. I would either build a package from source on your system or get the correct binary if available.

Why don't use install.packages("VIM") to install the :package: instead of copying ? it will get the correct binary if available.

If the issue is with the R version as I presumed, you could try your process with the correct built package under 3.3 version : https://cran.r-project.org/bin/windows/contrib/3.3/VIM_4.7.0.zip

2 Likes

Error Information:

library("rlang", lib.loc="C:/Program Files/R/R-3.3.2/library")
Error in inDL(x, as.logical(local), as.logical(now), ...) :
 unable to load shared object 'C:/Program Files/R/R-3.3.2/library/rlang/libs/i386/rlang.dll':
 LoadLibrary failure: The specified procedure could not be found.

In addition: Warning message:
package ‘rlang’ was built under R version 3.5.1
Error: package or namespace load failed for ‘rlang’

Steps taken so far -

Located and downloaded correct package from:
https://cran.r-project.org/bin/windows/contrib/3.5/rlang_0.2.1.zip

Copied the file to: C:\Program Files\R\R-3.3.2\library

Installed file using R 'install package from local files'

R confirms package is installed.

When opening the package in RStudio I get the above error information

System Information:

  • RStudio Edition: Desktop

  • RStudio Version: v1.0.44

  • OS Version: Win7 32-bit

  • R Version: 3.3.2

This appears to be the same issue as the one in one of your other threads:

1 Like

This is the same issue. Try to follow the step I explained above. And tell us if this is still an issue. Thanks!

Thanks all for your reply's

cderv - In my organisation all software is packaged and deployed in a controlled environment. I need to download each package and install it on a proof of concept PC before handing them over to the Desktop team to package. End users do not have the rights to install packages themselves on the live environment. So I'm unable to use install.packages as I wont be able to capture the additional packages it installs, instead I have to manually download and install each dependant package.

I have tried with the 3.3 version of the VIM package but still no luck, this is the error I see as before:

Error in inDL(x, as.logical(local), as.logical(now), ...) : allocation failure in R_setPrimitiveArgTypes

The same applies to rlang:
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object 'C:/Program Files/R/R-3.3.2/library/rlang/libs/i386/rlang.dll':
LoadLibrary failure: The specified procedure could not be found.

Any further assistance would be gratefully received.
Thanks you

We are also working on offline environment and we use internal cran to install packages. On an online "POC" PC, using miniCRAN you can download all the dependencies you need and create a local cran repository on a filesystem. When this is validated by your IT team, you can use this internal CRAN-like repo for your offline veted environment and install :package: using install.packages. No need to install manually every package.

Moreover, if you wish to continue downloading :package manually, you can at least install them manually in the correct dependency order using install.packages("pkg-file.zip", repos = NULL). It is a local installation. Drawback is dependency is not automatically resolved.

You tried again with VIM but does rlang is correctly installed in correct version ?