tests/testthat/test-tabular.R

testthat::context('tabular')

testthat::describe('convert dataframe to tabular header',{
  
  tab <- tabular(mtcars)
  
  it('length',testthat::expect_equal(nchar(tab),3495))
  it('class',testthat::expect_true(inherits(tab,'character')))
     
})

testthat::describe('convert dataframe to tabular no header',{
  
  tab <- tabular(mtcars,header = FALSE)
  
  it('length',testthat::expect_equal(nchar(tab),3291))
  
  
})

Try the sinew package in your browser

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

sinew documentation built on March 31, 2022, 5:06 p.m.