


After executing the above commands I end up with my package build and installed on my system. The arguments, R.libs, repo.root specify the folders in which I store my R file, my R libraries and output package respectively. Following the roxyPackage vignette I have to pass a data frame with the details of a typical DESCRIPTION file to roxyPackage for it to turn the R file into a package. In my next step I use roxyPackage to turn this file into its own standalone Doughnut package. On top of the function code I wrote the help file documentation using the roxygen2 syntax. I took the basic pie chart function and amended it to plot another white disc in the middle. For my toy example I wrote a doughnut plot function in R, something which is clearly missing ) As I said in my notes to the meeting, with roxyPackage I can create a package from a single file of R code and documentation.Here is an example of one R file to build a package using roxyPackage. Meik presented his package at the Cologne R user group meeting a few weeks ago and I was intrigued by it. The roxyPackage by Meik Michalke goes a step further, building on roxygen2. It allows me to tie R code together with the documentation in the same file and helps considerably in maintaining R packages. A good start to achieve this is using roxygen2, an R package which has been around for some time. Ideally I want my R code and documentation in as few files as possible. Thus, anything that soothes the pain of writing and maintaining documentation must be good and should help me to better understand my ‘old me’ in the future.

Well, I am clearly loosing my talent, as I sometimes struggle to understand what I programmed years ago. When I was younger I said ‘documentation is for people without talent’.

Yet, the older (and wiser?) I get, the more I realise how important it is.
