More on reproducibility

More on reproducibility…
Author

Muxin Hua

Published

March 2, 2023

Frontmatter check Render rmarkdown

What happens when we change the Rmd file and commit?

In Blog 5 you had the first exposure to Github Actions. We just checked frontmatter compliance (as we do for this round). You see that we have added a second action - here, we are converting the Rmarkdown document to a markdown file by running render_rmarkdown on Github. This action passes successfully for this document. We want to do something similar for blog #4.

Now start reading …

Read the vignette Introduction to renv for the renv R package by Kevin Ushey.

Then do:

  1. Install the R package renv on your local machine.

  2. In the project for blog 4, initialize the workflow used by the renv package.

  3. Add all dependencies to the environment (implicitly by installing all the depepndencies or explicilty by listing dependencies in a DESCRIPTION file).

  4. Add the renv folder to your blog 4 repository, and push the changes.

  5. Is the github action working? Read any potential error messages in the workflow and try to fix things. Make sure to check stackoverflow for help, don’t forget our Discussion board!

Write a blog post addressing the following questions:

  1. What is the idea of the renv package? renv package is an effort to manage R dependency in terms of project. It creates project specific R dependencies by initializing command and keeps track of version upgrades and new installations by snapshot. In such a way, it is easier for developer to trace and reset if needed. It’s also easier for anyone accesses the code to reproduce.

  2. In 50 to 100 words describe your experience working with renv. What went well? What did not go so well? Installing renv was smooth and initializing was convenient to keep track of all the dependencies, except the render-rmarkdown kept complaining about there is no package called rmarkdown. I searched stackflow, one of the answers mentioned “making sure rmarkdown is included in .lock file’. I went to the lock file but couldn’t find rmarkdown, which I’m sure I have installed it and took a snapshot. I check the status by renv::status() finding there were packages upgraded haven’t been recorded, one of them was rmarkdown, so I did snapshot again, touched little on README.Rmd to trigger github action and pushed it with updated .lock file, passed the action eventually.

Submit this blog post to your blog-6 repo.