In RStudio, open File and select New Project and pick the option for R Package. Two libraries are required for making a package. Once you have some working code, the best approach is to use RStudio to make the package. In fact, a package is probably best built out of a bunch of scripts that are already working and ready to be “packaged” up for release. One way to think of a package as a robust set of scripts that are well documented. In my case I needed to build an installable package so that students taking a class I teach could easily install my code and run a practical session. Another is to force yourself to document these functions in a more rigorous way. One is to make the functions available to use for other projects. If you are using R and you have developed some scripts and useful functions, you might be wondering why build a package? There are quite a few reasons. Karl Broman’s guide to building packages –.But having gone through the process I figured it was worthwhile summarising what I did and what I found tricky.įirst off, there are a ton of resources out there that describe how to go about building a package. The answer of course was: I searched, read, and stumbled around until it was done. I recently made my first R package and was asked how I did it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |