First, load the reproducibleRchunks
package in the first
code chunk. Once the package is loaded, the code chunk type
reproducibleR
is now available. Your first code chunk will
probably look like this:
Now, you can use reproducibleR chunks like you use normal R code chunks. For example, let us define some data and run a simple statistical model in the following code chunk:
✅model: REPRODUCTION SUCCESSFUL
✅x: REPRODUCTION SUCCESSFUL
✅y: REPRODUCTION SUCCESSFUL
The reproducibleRchunks package will store meta-data about all variables that are newly declared within a given chunk. Every time, the document is regenerated and metadata are present, reproducibleR will compare the original data and the regenerated data and will display information about whether they match or not.