tests/testthat/test-tidyr.R

context("tidyr")

library(tidyr)

test_that("gather properly gathers columns", {
    gTheoph <- Theoph %>% gather(key, value, -Subject)
    expect_true(all(unique(gTheoph$key) %in% c("Wt", "Dose", "Time", "conc")))
})
dpastoor/phmxversecore documentation built on Aug. 30, 2017, 3:13 p.m.