I am pleased to announce a fresh and simple approach on automatic
caseconversion with a concise design philosophy via the snakecase-pkg (
https://cran.r-project.org/package=snakecase).

Just use to_any_case(string, case) and (if the cases are too complex for
the default options) provide its most important arguments with further
information about:
- how a string should be parsed (regular expressions)
- how the result should be split (character).
On the way you can achieve things like special character handling and minor
customizations as also documented on github (
https://github.com/Tazinho/snakecase)

Examples:
- Easy case conversions:
"RStudio" to "R_Studio" (parsed) "r_studio", "R_STUDIO", "rStudio",
"RStudio"  or choose any other separator than the default "_" or "".
- More complex (different meanings of dots (separator or decimal) and
umlauts)
"R.Stüdio: v.1.0.143" to "rstüdio_v_1_0_143" or "r_stüdio_v_1.0.143", "R
Stuedio v 1.0.143",...

Note that the usecases are not only formatting for naming conventions
itself, but also for automated pretty printing like "RStudio" to "R Studio".

Best,
Malte Grosser

        [[alternative HTML version deleted]]

_______________________________________________
R-packages mailing list
r-packa...@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-packages
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to