Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer my renv.lock file to my DESCRIPTION file #2034

Closed
mhurtado13 opened this issue Nov 14, 2024 · 1 comment
Closed

Transfer my renv.lock file to my DESCRIPTION file #2034

mhurtado13 opened this issue Nov 14, 2024 · 1 comment

Comments

@mhurtado13
Copy link

Hello, I have a question regarding the functionalities of renv. I have a project where I use renv and basically i have all the libraries i need for running it in a renv.lock. Now I am creating a package based on this project so following the documentation I need to import all the packages dependencies in the DESCRIPTION file from my package. As these are mostly the same ones I had in my renv.lock file, is there a way I can transfer all the libraries in renv.lock and having it automatically written as imports in the DESCRIPTION file and avoid to write one-by-one?

I have been trying to find this info but I had no success, I found it is possible to do renv::install but as far I understood this is when you already have a DESCRIPTION file with the 'imports' section completed. Sorry if I missed something in the documentation, I am really new in the field of R package development!

Hope you can help me, thanks!

@kevinushey
Copy link
Collaborator

There isn't anything directly available, but you could do it by hand by reading the lockfile with e.g. renv::lockfile_read(), and then constructing DESCRIPTION file entries as appropriate. I don't think there's anything extra needed from renv here so I'm going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants