I'm preparing a manuscript for the R Journal now, and have been super impressed with rjtools as a useful helper. While using it, I noticed a couple things that were easy fixes that improved my quality-of-life while using the package, so this pull request would include these in the package for everyone else.
Edited the error/success messages for check_title().
Currently, check_title() gives a recommendation to use toTitleCase() when the title is correctly formatted. This commit moves that recommendation to the error condition rather than the success condition, where it seems to make more sense.
I also explicitly specify that toTitleCase() comes from the tools package because it took me a bit to realize that wasn't an rjtools function.
Added NA handling to the check_abstract_before_intro() function
In my document, I specify the introduction using \section{Introduction}, which isn't picked up by the check_abstract_before_intro function for some reason. This makes it return NA, which throws an error and stops the workflow with Error in if (abstract < intro) { : missing value where TRUE/FALSE needed
Added an option to check_proposed_package() that allows specifying the package as an argument rather than a user input
Purely for convenience, I added an argument to this function that lets you specify the package you're checking rather than waiting for user input via readline. This was nice because I could just run the whole suite of check_XXX functions without needing to manually enter the info each time.
Argument has been added with a default of NULL, so this should also work as-is with existing packages.
Package builds and installs nicely on my machine, but R CMD CHECK throws an error because the lazy-load database rjtools.rdb is corrupt but I don't think I touched that, so it shouldn't be an issue.
I'm preparing a manuscript for the R Journal now, and have been super impressed with
rjtools
as a useful helper. While using it, I noticed a couple things that were easy fixes that improved my quality-of-life while using the package, so this pull request would include these in the package for everyone else.check_title()
.check_title()
gives a recommendation to usetoTitleCase()
when the title is correctly formatted. This commit moves that recommendation to the error condition rather than the success condition, where it seems to make more sense.toTitleCase()
comes from thetools
package because it took me a bit to realize that wasn't anrjtools
function.NA
handling to thecheck_abstract_before_intro()
function\section{Introduction}
, which isn't picked up by thecheck_abstract_before_intro
function for some reason. This makes it returnNA
, which throws an error and stops the workflow withError in if (abstract < intro) { : missing value where TRUE/FALSE needed
check_proposed_package()
that allows specifying the package as an argument rather than a user inputreadline
. This was nice because I could just run the whole suite ofcheck_XXX
functions without needing to manually enter the info each time.NULL
, so this should also work as-is with existing packages.Package builds and installs nicely on my machine, but R CMD CHECK throws an error because
the lazy-load database rjtools.rdb is corrupt
but I don't think I touched that, so it shouldn't be an issue.