'Where to use renv::snapshot() in the document

I am working on a replication file and am trying to figure out how to properly use "renv". I've read the documentation, but I'm still a bit confused on how to actualize this. After initializing via

renv::init()

I know I upload packages and work as normal, does

renv::snapshot()

then just need to be called at the end of the document?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source