From 036610bbf8398069cd1843f4581e1cf01a539840 Mon Sep 17 00:00:00 2001 From: Bradford Condon Date: Wed, 7 Mar 2018 15:13:53 -0500 Subject: [PATCH] make diagonal equal --- tests/testthat.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testthat.R b/tests/testthat.R index 007314e..86ba0f0 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -8,6 +8,8 @@ test_check("WGPAN") ID <- c("Amanita","Polyporus","Coprinus", "Daldinia", "Entoloma", "Flaviporus") myData<- matrix(1:36, nrow = 6, ncol = 6, dimnames = list(ID, ID)) diag(myData)<- 0 #set diagonal to 0 +#A pairwise distance matrix is equal along hte upper and lower triangular. Clone the upper onto the lower. +myData[lower.tri(myData)] <- myData[upper.tri(myData)] clades = c("Agaricales", "Polyporales", "Agaricales", "Xylariales", "Agaricales", "Polyporales") cladeList = data.frame(ID, clades) x<- myData