test_that("kmeans works", {
expect_equal(sum(k_means_cluster(rbind(matrix(rnorm(100, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2)), 2)
$clusters == 1), 50)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.