it is so sill problem, that I guess, I miss something.
So I have nothing at beginning:
.libPaths() "C:/Users/x/Documents/R/win-library/3.6" "C:/Program Files/R/R-3.6.1/library"
C:/Program Files/R/R-3.6.1/library I've got default packages, and empty personal library.
Then I have source of my package with
Package: x Type: Package Title: x Version: 0.3.9006 License: MIT Encoding: UTF-8 LazyData: true Depends: R (>= 3.0.0) Imports: rlang (<= 0.3.4) RoxygenNote: 6.1.1
.renvignore with ignored everything except this DESCRIPTION file.
With that I run in R (3.6.1):
install.packages('renv') # it's installed to my personal library renv::dependencies() > Finding R package dependencies ... Done! Source Package Require Version Dev > 3 C:/Users/x/Desktop/x/x/x/DESCRIPTION R >= 3.0.0 FALSE > 4 C:/Users/x/Desktop/x/x/x/DESCRIPTION rlang <= 0.3.4 FALSE
it's clear that I wants rlang 0.3.4.
Then I run:
r$> renv::init() * Discovering package dependencies ... Done! * Copying packages into the cache ... Done! The following package(s) will be updated in the lockfile: # CRAN =============================== - rlang [* -> 0.4.2] * Lockfile written to 'C:/Users/x/Desktop/x/x/renv.lock'. * Project 'C:/Users/x/Desktop/x/x' loaded. [renv 0.8.3] * renv activated -- please restart the R session.
And as you can see I get rlang 0.4.2.
How I can get version of packages, that I have in requirements?