Error: object 'rlang_dots_list' not found

I am running a new install of R (3.5.1) and RStudio (1.1.453) on a brand new Windows 10 desktop.

I have installed the rlang package using install.packages("rlang") without encountering any issues but when I attempt to load the package I get the following error

Error: package or namespace load failed for ‘rlang’:
 .onLoad failed in loadNamespace() for 'rlang', details:
  call: dots_list(...)
  error: object 'rlang_dots_list' not found

In trying to resolve this I've done the following

  1. Uninstalled and reinstalled R and RStudio
  2. Removed the rlang package and attempted to reinstall and load it via R for Windows 3.5.1
  3. Removed the rlang package and attempted to reinstall and load it via the terminal and -- R vanilla
  4. Removed the rlang package and downloaded the most recent release as a zip that I placed manually in my library folder
  5. Removed all user installed packages and attempted to reinstall and load rlang (in case other packages were responsible for the issues - which seemed unlikely since the only thing I had was tidyverse but seemed worth a shot)

packageDescription("rlang") gives the following output

Package: rlang
Version: 0.2.1
Title: Functions for Base Types and Core R and 'Tidyverse' Features
Description: A toolbox for working with base types, core R features like the condition system, and core
        'Tidyverse' features like tidy evaluation.
Authors@R: c( person("Lionel", "Henry", ,"", c("aut", "cre")), person("Hadley", "Wickham",
        ,"", "aut"), person("RStudio", role = "cph") )
License: GPL-3
LazyData: true
ByteCompile: true
Depends: R (>= 3.1.0)
Suggests: crayon, knitr, methods, pillar, rmarkdown (>= 0.2.65), testthat, covr
RoxygenNote: 6.0.1
NeedsCompilation: yes
Packaged: 2018-05-30 13:14:55 UTC; lionel
Author: Lionel Henry [aut, cre], Hadley Wickham [aut], RStudio [cph]
Maintainer: Lionel Henry <>
Repository: CRAN
Date/Publication: 2018-05-30 14:23:07 UTC
Built: R 3.5.1; x86_64-w64-mingw32; 2018-07-02 15:08:55 UTC; windows

-- File: [redacted]/My Documents/R/win-library/3.5/rlang/Meta/package.rds

and here is my sessionInfo()

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252
[4] LC_NUMERIC=C                       LC_TIME=English_Australia.1252    

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

loaded via a namespace (and not attached):
[1] compiler_3.5.1 tools_3.5.1

Hmm, strange indeed.

Have you tried installing the development version from GitHub?

# install.packages("devtools")
devtools::install_github("r-lib/rlang", build_vignettes = TRUE)

Thanks @mara, I was actually have issues with devtools as well but I appreciate the helpful suggestion :slight_smile:

I've now found (I think) the root cause of this problem at the solution(ish) I'm posting here in case other people have a similar issue in the future.

Answering my own question in case anyone else encounters a similar issue in the future...

Working with my work IT department we have now tied this to custom permissions on my workstation that mean that R packages can only be run to pre-specified libraries (in my case "C:\R\R-3.4.3\library").

Installing packages directly into that location fixes the issue but is not desirable for all the reasons that people might want to use custom locations (e.g. running multiple versions of the same package, keeping separate libraries for some projects).

As such there are two solutions that may be more or less attainable given your own IT system.

Convince your IT department to relax the permissions for R packages to allow custom library locations.
Give up and run everything from the "permitted" library location (e.g. C:\R\R-3.4.3\library)
Raise a support ticket every time you need to install a package into a custom location and hope that IT eventually gives in.