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). diff --git a/R/ops.R b/R/ops.R index 2e79c04..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 @@ -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) 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) #' 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)