I'm new to R and have started writing a medium-size project. Even though it will be distributed as part of an application, I've decided to make a package out of it to make the organisation neater.
How do I handle the fact that the DESCRIPTION file needs Version and Date fields, when I'm using version control? I wouldn't want to change that file with every git commit.
Is there a standard Makefile somewhere for this?
Further, I'm not completely clear on how I'd do this and still be able to use the package while developing.
Installation: To get started you need the following software installed on your computer: Git and if you are new to R, then you also need to install R and RStudio. Additionally you will also need a GitHub account. Git (Download Git): Download and install Git, making a note of where on your computer you are install it.
If you use the devtools
package you don't have to build and install your package after each edit - just use load_all()
and the job is done in your working session, so you can test your changes (ideally with the testthat
package).
I wrote an RPub about it: http://www.rpubs.com/geospacedman/lazydevtools
You still get the option to build a package source tarball for distribution.
Note that git doesn't promote a mechanism for automatically updating bits of files with every commit, like the $id$ thing in SVN. Linus himself said it was 'idiotic' and 'stupid':
http://www.gelato.unsw.edu.au/archives/git/0610/28891.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With