2020-06-24 11:48:23 +02:00
|
|
|
# library(devtools)#TEMP
|
2020-07-31 13:59:30 +02:00
|
|
|
library(testthat)#TEMP
|
2020-06-24 11:48:23 +02:00
|
|
|
# library(rBAPS)#TEMP
|
|
|
|
|
|
|
|
|
|
context("Opening files on greedyMix")
|
|
|
|
|
|
2020-07-31 13:59:30 +02:00
|
|
|
greedyMix(
|
|
|
|
|
tietue = "data/ExamplesDataFormatting/Example baseline data in GENEPOP format for Trained clustering.txt",
|
|
|
|
|
format = "GenePop",
|
|
|
|
|
savePreProcessed = FALSE
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
context("Linkage")
|
|
|
|
|
|
|
|
|
|
test_that("Linkages are properly calculated", {
|
|
|
|
|
Y <- c(0.5, 0.3, 0.6, 0.3, 0.3, 0.2, 0.3, 0.3, 0.3, 0.5)
|
|
|
|
|
expect_equal(
|
|
|
|
|
object = linkage(Y),
|
|
|
|
|
expected = matrix(c(2, 1, 7, 8, 4, 3, 5, 6, .2, .3, .3, .6), ncol=3)
|
|
|
|
|
)
|
|
|
|
|
})
|