renv installs inproper version of package

December 3, 2019 @nbb jakub

@nbb wrote:

Hello everyone,
it is so sill problem, that I guess, I miss something.

So I have nothing at beginning:

"C:/Users/x/Documents/R/win-library/3.6" "C:/Program Files/R/R-3.6.1/library"

In 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 DESCRIPTION:

Package: x
Type: Package
Title: x
Version: 0.3.9006
License: MIT
Encoding: UTF-8
LazyData: true
Depends: R (>= 3.0.0)
  rlang (<= 0.3.4)
RoxygenNote: 6.1.1

and .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
> 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?

Posts: 5

Participants: 2

Read full topic

Previous Article
Find job id or application name from process id
Find job id or application name from process id

@GeeGee wrote: I would like to understand list of applications with high CPU and...

Next Article
About R studio for windows 7
About R studio for windows 7

@TEDDYY wrote: hi, i have installed R 3.6 and R studio but i cant install any pa...