From e12af738fb2f7c8dbc3487289d101d4f23c4ca55 Mon Sep 17 00:00:00 2001 From: Adriaan Dokter Date: Mon, 15 Jul 2024 15:20:03 -0400 Subject: [PATCH] clarify input argument of composite_ppi --- R/composite_ppi.R | 2 +- tests/testthat/test-composite_ppi.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/composite_ppi.R b/R/composite_ppi.R index 8f49f28e9..9b5d89d29 100644 --- a/R/composite_ppi.R +++ b/R/composite_ppi.R @@ -92,7 +92,7 @@ composite_ppi <- idw_max_distance = NA, coverage = FALSE) { if (FALSE %in% sapply(x, is.ppi)) { - stop("'composite' expects objects of class ppi only") + stop("'x' should be an object of class ppi, or a list of objects of class ppi") } if (!assertthat::is.count(nx) && missing(res)) stop("'nx' should be an integer") if (!assertthat::is.count(ny) && missing(res)) stop("'ny' should be an integer") diff --git a/tests/testthat/test-composite_ppi.R b/tests/testthat/test-composite_ppi.R index 903833b4b..73d7ee52d 100644 --- a/tests/testthat/test-composite_ppi.R +++ b/tests/testthat/test-composite_ppi.R @@ -3,7 +3,7 @@ test_that("composite_ppi() returns error on incorrect parameters", { ppis <- lapply(pvol$scans, project_as_ppi) expect_error( composite_ppi(example_vp), - regexp = "'composite' expects objects of class ppi only", + regexp = "'x' should be an object of class ppi, or a list of objects of class ppi", fixed = TRUE ) expect_error(