tests/testthat/test_1-2-0-weight2rows.R

context("weight2rows")

test_that("Non-numeric var", {
  expect_error(weight2rows(data.frame(x = 1:10,
                                      y = letters[1:5],
                                      stringsAsFactors = FALSE),
                           "y"), 
               regexp = "Non-numeric weight.var",
               fixed = TRUE)
})

Try the hutils package in your browser

Any scripts or data that you put into this service are public.

hutils documentation built on April 13, 2022, 5:23 p.m.