(v0.7.1.9091) percentage from clean pkg

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2019-09-30 16:45:36 +02:00
1 parent b39e7feae6
commit edb599ae0b
30 files changed
+419 -435

No files matched your search

-10
View File
@@ -21,16 +21,6 @@
context("misc.R")
test_that("percentages works", {
expect_equal(percent(0.25), "25%")
expect_equal(percent(0.5), "50%")
expect_equal(percent(0.500, force_zero = TRUE), "50.0%")
expect_equal(percent(0.1234), "12.3%")
# round up 0.5
expect_equal(percent(0.0054), "0.5%")
expect_equal(percent(0.0055), "0.6%")
})
test_that("functions missing in older R versions work", {
expect_equal(strrep("A", 5), "AAAAA")
expect_equal(strrep(c("A", "B"), c(5, 2)), c("AAAAA", "BB"))