context("WTSS")
test_that("Info", {
data(cerrado_2classes)
zoo.lst <- sits_to_zoo(cerrado_2classes[1:5,])
expect_equal(length(zoo.lst), 5)
expect_equal(dim(zoo.lst[[1]])[1], 23)
expect_equal(dim(zoo.lst[[1]])[2], 2)
})
test_that("TS", {
ts1 <- cerrado_2classes[1,]
ts2 <- sits_to_ts(ts1, band = "ndvi")
vals1 <- dplyr::pull(as.vector(ts1$time_series[[1]][,"ndvi"]))
vals2 <- as.vector(ts2)
expect_equal(vals1[1], vals2[1])
expect_true(length(vals2) > length(vals1))
expect_equal(vals1[length(vals1)], vals2[length(vals2)] )
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.