From 755a49ec0d80a01a27eacf694f528dd63a0de509 Mon Sep 17 00:00:00 2001 From: "Win Cowger, PhD" Date: Wed, 6 Dec 2023 19:01:56 -0800 Subject: [PATCH] keep working on this. added plot to inspect. --- tests/testthat/test-match_spec.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-match_spec.R b/tests/testthat/test-match_spec.R index 1b29fc11..35583357 100644 --- a/tests/testthat/test-match_spec.R +++ b/tests/testthat/test-match_spec.R @@ -52,7 +52,11 @@ test_that("os_similarity() handles input errors correctly", { distance1 <- unlist(abs(unspectra2 - unspectra2)) |> mean(na.rm = T) distance2 <- unlist(abs(unspectra2 - spectra2)) |> mean(na.rm = T) distance3 <- unlist(abs(CAspectra2 - unspectra2)) |> mean(na.rm = T) - + test <- abs(CAspectra2 - unspectra2) + + ggplot() + + geom_line(aes(x = seq(0,1, by = 0.1), y = unspectra2[[30]])) + os_similarity(raman_hdpe, raman_hdpe) |> expect_equal(1)