mirror of
https://github.com/msberends/AMR.git
synced 2025-07-11 23:42:02 +02:00
dplyr 0.8.0 support, fixes #7
This commit is contained in:
@ -20,17 +20,17 @@ context("age.R")
|
||||
|
||||
test_that("age works", {
|
||||
expect_equal(age(x = c("1980-01-01", "1985-01-01", "1990-01-01"),
|
||||
y = "2019-01-01"),
|
||||
reference = "2019-01-01"),
|
||||
c(39, 34, 29))
|
||||
|
||||
expect_error(age(x = c("1980-01-01", "1985-01-01", "1990-01-01"),
|
||||
y = c("2019-01-01", "2019-01-01")))
|
||||
reference = c("2019-01-01", "2019-01-01")))
|
||||
|
||||
expect_error(age(x = c("1980-01-01", "1985-01-01", "1990-01-01"),
|
||||
y = "1975-01-01"))
|
||||
reference = "1975-01-01"))
|
||||
|
||||
expect_warning(age(x = c("1800-01-01", "1805-01-01", "1810-01-01"),
|
||||
y = "2019-01-01"))
|
||||
reference = "2019-01-01"))
|
||||
})
|
||||
|
||||
test_that("age_groups works", {
|
||||
|
Reference in New Issue
Block a user