Add a suite of pretty_* functions for neatly presenting data values (big numbers, time references and file sizes).
Why are these changes being made?
We use these functions in a number of places and sometimes even write multiple versions in a single repo, so having some standardised ones would be helpful and save time.
It's also been a useful process as it's allowed me to QA some code I wrote years ago in other projects that had questionable maths in it...
Detailed description of changes
Add 4 new functions - comma_sep(), pretty_filesize(), pretty_num(), pretty_time_taken().
comma_sep() is the same as cs_num() that appears a lot in our repos, it's mainly a helper function that's reused in this package, and I imagine people may mainly use pretty_num() instead, but exported it as some may find it useful in isolation too.
pretty_num() is an attempted rework of fmtRdble() and other incarnations, which takes comma_sep() and also rounds / adds prefixes and suffixes to big numbers as well as converting to million and billion in text.
pretty_filesize() and pretty_time_taken() are mainly based on functions from the old analytics app and the data screener.
Some minor updates to the contributing page, including shortcuts for roxygen2
Bumps the package version to 0.3.0 as there's new features
Additional information for reviewers
Git history seems to be messy / duplicative of #68, will squash this into a single commit when it goes in.
Brief overview of changes
Add a suite of pretty_* functions for neatly presenting data values (big numbers, time references and file sizes).
Why are these changes being made?
We use these functions in a number of places and sometimes even write multiple versions in a single repo, so having some standardised ones would be helpful and save time.
It's also been a useful process as it's allowed me to QA some code I wrote years ago in other projects that had questionable maths in it...
Detailed description of changes
comma_sep()
,pretty_filesize()
,pretty_num()
,pretty_time_taken()
.comma_sep()
is the same ascs_num()
that appears a lot in our repos, it's mainly a helper function that's reused in this package, and I imagine people may mainly usepretty_num()
instead, but exported it as some may find it useful in isolation too.pretty_num()
is an attempted rework offmtRdble()
and other incarnations, which takescomma_sep()
and also rounds / adds prefixes and suffixes to big numbers as well as converting to million and billion in text.pretty_filesize()
andpretty_time_taken()
are mainly based on functions from the old analytics app and the data screener.Some minor updates to the contributing page, including shortcuts for roxygen2
Bumps the package version to 0.3.0 as there's new features
Additional information for reviewers
Git history seems to be messy / duplicative of #68, will squash this into a single commit when it goes in.
Issue ticket number/s and link
Resolves #64 #60