Skip to content

Commit

Permalink
clarify input argument of composite_ppi
Browse files Browse the repository at this point in the history
  • Loading branch information
adokter committed Jul 15, 2024
1 parent 3152d86 commit e12af73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/composite_ppi.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-composite_ppi.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e12af73

Please sign in to comment.