tests/testthat/test_clean_data.R

context("clean data")

dat<-NOAA_quakes

test_that("data frame format is right",{
  
  res<-clear_data(dat)
    
  expect_is(res$EQ_PRIMARY, "numeric")
  expect_is(res$LATITUDE, "numeric")
  expect_is(res$LONGITUDE, "numeric")
  expect_is(res$TOTAL_DEATHS, "numeric")
  expect_is(res$DATE, "Date")
  
  expect_s3_class(res,"tbl")
  
})
jyjek/jyjekNOAA documentation built on May 7, 2019, 10:52 p.m.