Added test for linkage()
This commit is contained in:
parent
3018427237
commit
a31fafd5de
1 changed files with 16 additions and 6 deletions
|
|
@ -1,11 +1,21 @@
|
||||||
# library(devtools)#TEMP
|
# library(devtools)#TEMP
|
||||||
# library(testthat)#TEMP
|
library(testthat)#TEMP
|
||||||
# library(rBAPS)#TEMP
|
# library(rBAPS)#TEMP
|
||||||
|
|
||||||
context("Opening files on greedyMix")
|
context("Opening files on greedyMix")
|
||||||
|
|
||||||
# greedyMix(
|
greedyMix(
|
||||||
# tietue = "data/ExamplesDataFormatting/Example baseline data in GENEPOP format for Trained clustering.txt",
|
tietue = "data/ExamplesDataFormatting/Example baseline data in GENEPOP format for Trained clustering.txt",
|
||||||
# format = "GenePop",
|
format = "GenePop",
|
||||||
# savePreProcessed = FALSE
|
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)
|
||||||
|
)
|
||||||
|
})
|
||||||
Loading…
Add table
Reference in a new issue