Skip to content

Commit e5556d6

Browse files
committed
Shorten examples execution time.
1 parent e83ab2a commit e5556d6

5 files changed

Lines changed: 16 additions & 16 deletions

File tree

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
^[.]?air[.]toml$
1313
^\.vscode$
1414
^cran-comments\.md$
15+
^CRAN-SUBMISSION$

R/two-sample-functional-test.R

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@
4646
#'
4747
#' @export
4848
#' @examples
49-
#' out <- two_sample_functional_test(trefoils1, archspirals, B = 10L, scale_size = 20L)
49+
#' tref1 <- trefoils1[1:5]
50+
#' archsp <- archspirals[1:5]
51+
#' out <- two_sample_functional_test(tref1, archsp, B = 10L, scale_size = 20L)
5052
#' plot(out$iwt, xrange = range(out$scale_seq))
5153
#' matplot(
5254
#' out$scale_seq[-1],
5355
#' t(rbind(out$xfd, out$yfd)),
5456
#' type = "l",
55-
#' col = c(rep(1, length(trefoils1)), rep(2, length(archspirals)))
57+
#' col = c(rep(1, length(tref1)), rep(2, length(archsp)))
5658
#' )
5759
two_sample_functional_test <- function(
5860
x,
@@ -66,17 +68,8 @@ two_sample_functional_test <- function(
6668
B = 1000L,
6769
paired = FALSE
6870
) {
69-
if (!inherits(x, "persistence_set")) {
70-
cli::cli_abort(
71-
"The first argument {.arg x} must be of class {.cls persistence_set}."
72-
)
73-
}
74-
75-
if (!inherits(y, "persistence_set")) {
76-
cli::cli_abort(
77-
"The second argument {.arg y} must be of class {.cls persistence_set}."
78-
)
79-
}
71+
x <- phutil::as_persistence_set(x)
72+
y <- phutil::as_persistence_set(y)
8073

8174
# Match arguments
8275
representation <- rlang::arg_match(representation)

cran-comments.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Resubmission
2+
3+
This is a resubmission in which we made sure to shorten example execution time on windows platforms.
4+
15
## Test environments
26

37
* local macOS R installation, R 4.5.1

man/inphr-package.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/two_sample_functional_test.Rd

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)