Nothing
### knn
test_that("Whether knn works", {
point_cloud <- data.table(X = c(0, 0, 0, 0, 0, -1, 1),
Y = c(0, 0, 0, -1, 1, 0, 0),
Z = c(-1, 0, 1, 0, 0, 0, 0))
to_test <- knn(point_cloud, point_cloud, 6, same = TRUE)
expect_equal(nrow(to_test[ref == 2]), 6, info = "knn")
expect_equal(max(to_test$distance), 2, info = "value of distance")
expect_equal(min(to_test$distance), 1, info = "value of distance")
to_test <- knn(point_cloud, point_cloud, 2, same = FALSE)
expect_equal(nrow(to_test[ref == 2]), 7, info = "knn")
expect_equal(max(to_test$distance), 1, info = "value of distance")
expect_equal(min(to_test$distance), 0, info = "value of distance")
})
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.