Rstudio: "No addins found" despite addins installed

Viewed 996

I'm trying to install Rstudio addins, but they don't show up in the Addins button or Tools → Addins → Browse Addins... menu. I first updated my Rstudio, and then reinstalled again, to no avail.

This is how I proceed:

devtools::install_github("rstudio/addinexamples", type = "source")

It installs successfully (and I can check that it appears correctly in the package tab or in C:\Users\USERNAME\Documents\R\win-library\4.0\addinexamples) but still does not show up under the addins button. Username has special characters though (French accents). Would that be the problem?

enter image description here

Even after loading the library manually as so:

library(addinexamples)

The library appears loaded but no button. I tried many other packages with the same result (e.g., addinmanager, addinslist, colourpicker, esquisse). I also tried installing packages from CRAN directly with the same results. E.g.,

install.packages("datapasta")
package ‘datapasta’ successfully unpacked and MD5 sums checked

enter image description here

Any idea? Thanks.

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252    LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] lattice_0.20-41  codetools_0.2-16 mvtnorm_1.1-1    zoo_1.8-8        psych_2.0.7      MASS_7.3-53     
 [7] grid_4.0.3       nlme_3.1-149     xtable_1.8-4     coda_0.19-4      estimability_1.3 multcomp_1.4-13 
[13] bootES_1.2       Matrix_1.2-18    boot_1.3-25      sandwich_2.5-1   splines_4.0.3    TH.data_1.0-10  
[19] tools_4.0.3      emmeans_1.5.1    parallel_4.0.3   survival_3.2-7   compiler_4.0.3   mnormt_2.0.1   

Reposted from: https://community.rstudio.com/t/no-addins-found/92070

2 Answers

Edit: Seems like what might have actually fixed the issue in my case is to relocate my library path to a location with no accents, e.g., C:/Rpackages. So I first created a new folder C:/Rpackages and then copied all my current non-base packages there.

I then used the following instructions to change my default file path:

Installations of R will tend to install libraries at C:/Program Files/R/R-X.X.X/library, which may not always be writable. The only way to effectively change this default resides outside of R in Microsoft Windows.

In the Microsoft Control Panel, go to System and Security > System > Advanced system settings > Environment variables.

A new environment variable should be created by clicking on “New…” and entering R_LIBS_USER as the variable name and [your new path, e.g., C:/Rpackages] as the variable path (change as appropriate).

Save the changes and restart R.

enter image description here

Then check that the library is set correctly correctly:

> .libPaths()
[1] "C:/Rpackages"                      "C:/Program Files/R/R-4.0.5/library"

Note: the default library will always be the one on the left, so it's displaying correctly right now. However, the one on the right cannot be changed and will display the R version you're using for base and default packages. That's OK and the issue is still fixed.

Thanks @Bjnör for help identifying the issue.


Old answer:

The issue is now fixed on my end, though I am not exactly sure how. I did update Rstudio and R to the latest versions, and now the problem is gone, so it is likely that this is what solved it in my case given I don't think I have changed anything else.

  • Rstudio Version 1.4.1717
  • R version 4.0.5 (2021-03-31)

enter image description here

Ok I think I now what solved the issue. You can not have any special character in your .libPaths(). In my case it was the ö. Once I changed the .libPaths() to a special character free directory addins did appear in RStudio (see the Screenshot below)

Step-By-Step Guide:

  1. Check if your standard serach paths for R (.libPaths()) contains special characters (e.g., ö, é or others). In my case it did:

    .libPaths()
    [1] "C:/Users/Björn/Documents/R/win-library/4.1" "C:/Program Files/R/R-4.1.1/library" 
    
  2. Create a safety backup of your current .libpaths():

    # Creates an .rds file in the current working directory
    saveRDS(.libPaths(),"BackupR-PackageSearchPaths.rds")
    
  3. Create a new directory without any special characters, where you want to store R-Packages in the future. You could for example use: C:/Rpackages

  4. If you want to make your life easier go to the old directory of R-packages (in my case: C:/Users/Björn/Documents/R/win-library/4.1 and copy all packages to the new directory C:/Rpackages

  5. Add the new directory to the .libPaths().
    Please note: Don't get confused with the windows default backslash (\) in paths. Just use the forward slash like C:/Rpackages or make sure to escape the backslash with a double backslash \\

    .libPaths(c("C:/Rpackages","C:/Program Files/R/R-4.1.1/library" ))
    
  6. On restart of Rstudio however the .libPaths() resets to the default. To change this behavior you want to add the new directory to the environment (path) variables on your local machine, as pointed out by RemPsyc. Just press win + r to open the run command and enter the following text

    rundll32.exe sysdm.cpl,EditEnvironmentVariables

    enter image description here

  7. This will open the environment variable editing window: there you can click on "new" and add the following - see also this answer

    Variable name: R_LIBS_USER
    Variable value: C:/software/Rpackages

Result:

This solve the issue for me
enter image description here

Setup
R = 4.1.1
RStudio Version 1.4.1717

Related