From c6f3718de2e1bc9e507733f735b7f4d3b9a86063 Mon Sep 17 00:00:00 2001 From: olivroy Date: Thu, 9 Nov 2023 13:45:11 -0500 Subject: [PATCH 1/4] lintr::lint_package(linters = lintr::length_test_linter()) --- R/count_unconnected_nodes.R | 2 +- R/trav_in_until.R | 2 +- R/trav_out_until.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/count_unconnected_nodes.R b/R/count_unconnected_nodes.R index 2e0fc87f..42f96b1e 100644 --- a/R/count_unconnected_nodes.R +++ b/R/count_unconnected_nodes.R @@ -59,7 +59,7 @@ count_unconnected_nodes <- function(graph) { nodes_in_edf) %>% dplyr::pull("node_id") - if (length(nodes_in_edf > 0)) { + if (length(nodes_in_edf) > 0) { return(length(nodes_not_in_edf)) } else { return(0L) diff --git a/R/trav_in_until.R b/R/trav_in_until.R index 95384b01..bc2efc0e 100644 --- a/R/trav_in_until.R +++ b/R/trav_in_until.R @@ -218,7 +218,7 @@ trav_in_until <- function( if (step == max_steps) break } - if (length(node_stack > 0)) { + if (length(node_stack) > 0) { if (add_to_selection) { diff --git a/R/trav_out_until.R b/R/trav_out_until.R index 77c17586..2c4f90c1 100644 --- a/R/trav_out_until.R +++ b/R/trav_out_until.R @@ -212,7 +212,7 @@ trav_out_until <- function( if (step == max_steps) break } - if (length(node_stack > 0)) { + if (length(node_stack) > 0) { if (add_to_selection) { From 2455259f7f44205442ca9f19c91917901306ed12 Mon Sep 17 00:00:00 2001 From: olivroy Date: Fri, 10 Nov 2023 09:41:51 -0500 Subject: [PATCH 2/4] correct a condition --- R/generate_dot.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/generate_dot.R b/R/generate_dot.R index c2741bb8..75cb4ecb 100644 --- a/R/generate_dot.R +++ b/R/generate_dot.R @@ -536,7 +536,7 @@ generate_dot <- function(graph) { exists("to_column")) { if (length(from_column) == 1 && - length(from_column) == 1) { + length(to_column) == 1) { for (i in 1:nrow(edges_df)) { From cefe768531ea88a234f4afb034ac874e967460d0 Mon Sep 17 00:00:00 2001 From: olivroy Date: Fri, 10 Nov 2023 09:49:59 -0500 Subject: [PATCH 3/4] Add news --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 13bcfae6..4520cce8 100755 --- a/NEWS.md +++ b/NEWS.md @@ -8,6 +8,8 @@ * It is now easier to install suggested packages on the fly. DiagrammeR now uses `rlang::check_installed()` internally. (@olivroy, #499) +* Some conditions were corrected in `trav_in_until()` and `trav_out_until()` (@olivroy, #504) + # DiagrammeR 1.0.10 * Remove dependency on the **influenceR** package, which also means removing the `get_constraint()` and `get_bridging()` graph inspection functions. From 34187a9195b4ce48a47b910b0568b44f8d1c324d Mon Sep 17 00:00:00 2001 From: olivroy <52606734+olivroy@users.noreply.github.com> Date: Tue, 13 Aug 2024 09:17:02 -0400 Subject: [PATCH 4/4] Update NEWS.md --- NEWS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 8110332e..9e2d7ffb 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # DiagrammeR (development version) +* Some conditions were corrected in `trav_in_until()` and `trav_out_until()` (@olivroy, #504). + # DiagrammeR 1.0.11 * DiagrammeR now has a dependency on viridisLite instead of viridis (@olivroy, #511) @@ -12,8 +14,6 @@ * It is now easier to install suggested packages on the fly. DiagrammeR now uses `rlang::check_installed()` internally. (@olivroy, #499) -* Some conditions were corrected in `trav_in_until()` and `trav_out_until()` (@olivroy, #504) - * `DiagrammeR()` checks the `type` argument more strictly. (@olivroy, #506) * DiagrammeR is compatible with igraph (>= 2.0.0) (@maelle, #500)