Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use a regular expression \\U to capitalize the first letter
an alternative way is a loop: for (i in c("design", "n", "event", "time", "bound", "power")) { # special case: Event -> Events names(ans)[names(ans) == i] <- if (i == "event") "Events" else { # capitalize the first letter sub("^(.)", "\\U\\1", i, perl = TRUE) } }
- Loading branch information