(v1.6.0.9052) unit tests

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2021-05-20 11:42:39 +02:00
1 parent d1b1828ab8
commit 4a2a48b7c1
16 files changed
+29 -25

No files matched your search

+3
View File
@@ -1150,6 +1150,9 @@ percentage <- function(x, digits = NULL, ...) {
if (is.null(digits)) {
digits <- getdecimalplaces(x)
}
if (is.null(digits) || is.na(digits) || !is.numeric(digits)) {
digits <- 2
}
# round right: percentage(0.4455) and format(as.percentage(0.4455), 1) should return "44.6%", not "44.5%"
x_formatted <- format(round2(as.double(x), digits = digits + 2) * 100,