Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Pull request branch #2
I have added unit tests and coverage tests. To make it easier to follow the coverage reports I have split the functionality into different files, but it will still work if all functions are put together again in a single file.
I had some plans for building a similar package to use in a couple of books I am writing, one on OOP and one on domain-specific languages in R, with a little different design for manipulation of units in mind, but I will try to build it on top of this package instead.
For my own use I cannot be restricted to standard physical units, though, so I will do write some code to deal with arbitrary units and default to udunits when units are known there. I have to think this through a little more, though.
This pull request is just the unit tests that I need before I start fiddling with the package code, and I thought you might find them useful as well.
It is unfortunately not that simple. We work with various time units, like mutations per year and years per generations that depends on the organisms we work with, so there are not really fixed conversions.
No worries, though, I know how to do the conversions myself in the framework, I just have to get some symbolic manipulation of units up and running. I will get it done tonight and show what I have in mind.