Nothing
context("vizAnnualClimate")
## tests
library(aqp, quietly = TRUE)
suppressWarnings(library(cluster, quietly = TRUE))
suppressWarnings(library(dendextend, quietly = TRUE))
suppressWarnings(library(latticeExtra, quietly = TRUE))
test_that("vizAnnualClimate works as expected", {
# use local data
data("OSDexamples")
a <- OSDexamples$climate.annual
# with / without highlight
res <- vizAnnualClimate(a)
res <- vizAnnualClimate(a, s = 'ZOOK')
# print(res$fig)
# list of lattice + clustering
expect_true(inherits(res, 'list'))
expect_true(inherits(res$fig, 'trellis'))
expect_true(inherits(res$clust, 'diana'))
# try a singleton
res <- vizAnnualClimate(a[1:8, ])
expect_true(inherits(res, 'list'))
expect_true(inherits(res$fig, 'trellis'))
# no clustering possible, result is NULL
expect_false(inherits(res$clust, 'diana'))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.