tests/testthat/test-distancematrix.R

# context("test-distancematrix")
# 
# set.seed(42)
# 
# a1 <- ghosts::distMatrix(data = mtcars,
#                           booled = T,
#                           method = "cosine")
# a2 <- ghosts::distMatrix(data = mtcars,
#                           booled = F,
#                           method = "euclidean")
# a3 <- ghosts::distMatrix(data = mtcars,
#                           booled = T,
#                           method = "manhattan")
# 
# 
# test_that("distanceMatrix works", {
#   expect_known_hash(a1, "7c99636ec3")
#   expect_known_hash(a2, "24df9e2d21")
#   expect_known_hash(a3, "85590a6b3d")
#  expect_error(ghosts::distMatrix(data = mtcars[,1],
#                        booled = T,
#                        method = "manhattan"))
#   
#     
#   })
chasemc/ghosts documentation built on May 8, 2019, 12:50 a.m.