context("find correlated groups")
groups1 <- corr_groups(mtcars)
groups2 <- corr_groups(mtcars, cor_mat = TRUE)
test_that("one correlated group is found in mtcars", {
expect_equal(length(groups1), 1)
expect_identical(groups1[[1]], c("disp", "cyl"))
})
test_that("matrix is returned", {
expect_equal(class(groups2[[1]]), "matrix")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.