context("classify residence points")
testthat::test_that("residence classification works", {
# read in data
revdata <- data.table::fread("../testdata/435_025_revisit.csv")
# run function
testoutput <- watlastools::wat_classify_points(
data = revdata,
lim_res_time = 2
)
# do tests
# test that the vector class is data.table and data.frame
testthat::expect_s3_class(
object = testoutput,
class = c("data.table", "data.frame")
)
# check that data are ordered in time
testthat::expect_gt(min(as.numeric(diff(testoutput$time)), na.rm = TRUE), 0)
})
# end here
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.