Building and checking a package
As we have seen before, RStudio makes many steps very easy when we want to build our own R package. RStudio also helps us with the finalizing steps of our package. These include building and testing our package and we can find the necessary options to perform these tasks in the build menu of RStudio.
These do not just help us as the final steps, but we also have to build and load our package a lot during the development process. This is the only way we can test all the functions of our package. To test our package, we should stick to the following steps:
Tweak our code and perform changes to our packages code base.
Build our package.
Install the package.
Unload the package.
Reload the package.
RStudio actually performs all these steps with the command Build and Reload.
We can see the output in the Build pane.
Checking a package
The
Check Package
function in the Build menu will check all dependencies of our package. This is very useful as it shows us exactly where errors...