Closed fkohrt closed 2 months ago
Is it possible to install a package from GitHub using install.packages()? Maybe rather use r-universe as a second example.
Yes, packages can be installed from any weblink. The renv::install()
function just simplifies this quite a bit.
I wondered whether you want to add a few words how install.packages() is altered in a repo which is controlled by renv?
I think explaining that {renv} shims install.packages()
with renv::install()
is probably better left unsaid for the tutorial.
Shouldn't this read something like "whether to use renv::embed() or a lockfile"?
Ope, yes this should!
During this step I get "No issues found -- the project is in a consistent state."
I've corrected this. I originally had the exercise set-up slightly differently, but did not update this text.
Rendering then fails due to the missing maps package, which I add to the lock file using renv::record("maps"). Only then the renv::restore() installs the missing package.
The rendering failure is intentional! I want people to go through precisely these steps.
Maybe I missed it, but what was your answer to this?
Also, now I'm warned that the project is out of sync due to the {maps} package that is recorded but seemingly not used. Is it supposed to be warn me? From the documentation I gather that the recommended way is to create a file called
_dependencies.R
withlibrary()
calls.
I'm also asking because I'm interested to hear your thoughts on it.
Maybe I missed it, but what was your answer to this?
Also, now I'm warned that the project is out of sync due to the {maps} package that is recorded but seemingly not used. Is it supposed to be warn me? From the documentation I gather that the recommended way is to create a file called
_dependencies.R
withlibrary()
calls.I'm also asking because I'm interested to hear your thoughts on it.
I made some relevant edits in the renv-exercises repo which haven't been integrated yet.
I'm indifferent on the creation of a _dependencies.R
file. One can accomplish the same thing by just including a library()
call at the top of the relevant script.
I made some relevant edits in the renv-exercises repo which haven't been integrated yet.
Ah, I see.
I'm indifferent on the creation of a
_dependencies.R
file. One can accomplish the same thing by just including alibrary()
call at the top of the relevant script.
Alright, just wondered whether you had in mind an entirely different way of handling this.
Overall, I found the introduction to renv to be very helpful and understandable! I have created one pull request each for both repos with smaller fixes (mostly typos: lmu-osc/introduction-to-renv#19 and lmu-osc/introduction-to-renv-exercises#3), feel free to accept or reject them. I have also created four issues (#20, #21, #22, #23) before creating this summary issue with all remaining (small) notes. But again, I deem it already a very worthwhile tutorial!
Background
Reproducibility
Technical definitions
install.packages()
? Maybe rather use r-universe as a second example.R Package Managers
{renv}
Quick start
Caching
Exercises > Explicitly Record
During this step I get "No issues found -- the project is in a consistent state."
Therefore, running
renv::restore()
, as is suggested next, leads to "The library is already synchronized with the lockfile."Rendering then fails due to the missing
maps
package, which I add to the lock file usingrenv::record("maps")
. Only then therenv::restore()
installs the missing package.Also, now I'm warned that the project is out of sync due to the {maps} package that is recorded but seemingly not used. Is it supposed to be warn me? From the documentation I gather that the recommended way is to create a file called
_dependencies.R
withlibrary()
calls.Optional content >
embed()
anduse()
renv::embed()
or a lockfile"?Open questions
install.packages()
is altered in a repo which is controlled by renv?I really liked it when you explained the three columns reported by
renv::status()
in {renv} > Starting Details > Status and Snapshot > Status.renv::snapshot()
will updaterecorded
according toused
renv::record()
will updaterecorded
renv::restore()
will updateinstalled
according torecorded
install.packages()
will updateinstalled