From 6e958a73dd0bd39aafedf329f545bd26757d04d2 Mon Sep 17 00:00:00 2001 From: SpatLyu Date: Sat, 24 Oct 2026 00:00:01 +0800 Subject: [PATCH 1/5] swap argument order --- R/ops.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ops.R b/R/ops.R index 2e79c04..8c09e28 100644 --- a/R/ops.R +++ b/R/ops.R @@ -58,7 +58,7 @@ #' #' @examples #' crash = sf::read_sf(system.file("case/crash.gpkg", package = "pc")) -#' pc::ops(crash, 1, 2, E = 3:10, maximize = "positive", threads = 1) +#' pc::ops(crash, 2, 1, E = 3:10, maximize = "positive", threads = 1) #' methods::setMethod("ops", "data.frame", .ops_ts) From 31f7123417959dd0ecb335a8aae9052cc5ea0d5a Mon Sep 17 00:00:00 2001 From: SpatLyu Date: Sun, 25 Oct 2026 00:00:01 +0800 Subject: [PATCH 2/5] swap argument order --- R/pc.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/pc.R b/R/pc.R index 5f8338e..d6a3871 100644 --- a/R/pc.R +++ b/R/pc.R @@ -89,12 +89,12 @@ #' #' @examples #' crash = sf::read_sf(system.file("case/crash.gpkg", package = "pc")) -#' p1 = pc::pc(crash, 1, 2, E = 3, k = 7, threads = 1) +#' p1 = pc::pc(crash, 2, 1, E = 3, k = 7, threads = 1) #' print(p1) #' plot(p1) #' #' # convergence diagnostics -#' p2 = pc::pc(crash, 1, 2, libsizes = seq(10,172,40), E = 3, k = 7, threads = 1) +#' p2 = pc::pc(crash, 2, 1, libsizes = seq(10,172,40), E = 3, k = 7, threads = 1) #' print(p2) #' plot(p2) #' From 31af1724724184b86fe586aa1a676bb3644b15ee Mon Sep 17 00:00:00 2001 From: SpatLyu Date: Sun, 25 Oct 2026 00:00:01 +0800 Subject: [PATCH 3/5] swap argument order --- R/ops.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ops.R b/R/ops.R index 8c09e28..c38f7dd 100644 --- a/R/ops.R +++ b/R/ops.R @@ -49,7 +49,7 @@ #' @return A list. #' \describe{ #' \item{\code{param}}{The selected optimal parameter combination.} -#' \item{\code{xmap}}{A data.frame containing cross-mapping performance across parameter settings.} +#' \item{\code{causality}}{A data.frame containing results across parameter settings.} #' } #' #' @export From b72f41e89f325f2e9222d661532831af397da4e4 Mon Sep 17 00:00:00 2001 From: SpatLyu Date: Sun, 25 Oct 2026 00:00:01 +0800 Subject: [PATCH 4/5] swap argument order --- man/ops.Rd | 4 ++-- man/pc.Rd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/ops.Rd b/man/ops.Rd index 270b816..3e23514 100644 --- a/man/ops.Rd +++ b/man/ops.Rd @@ -116,7 +116,7 @@ A list. \describe{ \item{\code{param}}{The selected optimal parameter combination.} -\item{\code{xmap}}{A data.frame containing cross-mapping performance across parameter settings.} +\item{\code{causality}}{A data.frame containing results across parameter settings.} } } \description{ @@ -124,6 +124,6 @@ Optimal Parameter Search for Pattern Causality } \examples{ crash = sf::read_sf(system.file("case/crash.gpkg", package = "pc")) -pc::ops(crash, 1, 2, E = 3:10, maximize = "positive", threads = 1) +pc::ops(crash, 2, 1, E = 3:10, maximize = "positive", threads = 1) } diff --git a/man/pc.Rd b/man/pc.Rd index f3bec9e..9bea3a5 100644 --- a/man/pc.Rd +++ b/man/pc.Rd @@ -151,12 +151,12 @@ Pattern Causality } \examples{ crash = sf::read_sf(system.file("case/crash.gpkg", package = "pc")) -p1 = pc::pc(crash, 1, 2, E = 3, k = 7, threads = 1) +p1 = pc::pc(crash, 2, 1, E = 3, k = 7, threads = 1) print(p1) plot(p1) # convergence diagnostics -p2 = pc::pc(crash, 1, 2, libsizes = seq(10,172,40), E = 3, k = 7, threads = 1) +p2 = pc::pc(crash, 2, 1, libsizes = seq(10,172,40), E = 3, k = 7, threads = 1) print(p2) plot(p2) From 9c7a9611e5060f4c5ab29a2e3ab4103d81cc5f7a Mon Sep 17 00:00:00 2001 From: SpatLyu Date: Sun, 25 Oct 2026 00:00:01 +0800 Subject: [PATCH 5/5] swap argument order --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index ac642b3..9304d58 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,6 +10,8 @@ ### breaking changes +* Reverse argument order for variable indices to `(source, target)` (#85). + * Impose geometric constraint `k >= E+1` in `ops` generic (#81). * Euclidean/Manhattan distances now automatically compensate for dimensions skipped due to `NA/NaN`, aligned with base R `dist()` function (#79).