tests/testthat/test-sparse-defaults.R

test_that("factors can have a zero", {
  filename <- tempfile()
  write("
@relation test
@attribute Test {-1,0,1}
@data

{}
{0 0}
{0 1}", filename)
  ds <- read.arff(filename)

  expect_true(ds[1,1] == "-1")
  expect_true(ds[2,1] == "0")
  expect_true(ds[3,1] == "1")
})

Try the yarr package in your browser

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

yarr documentation built on Aug. 10, 2019, 5:28 p.m.