Skip to content

Commit 9a3385f

Browse files
authored
removed netswan dependency (#203)
1 parent 382c2b7 commit 9a3385f

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

DESCRIPTION

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ Suggests:
3636
graph,
3737
influenceR,
3838
methods,
39-
netrankr,
40-
NetSwan,
39+
netrankr (>= 1.2.4),
4140
network,
4241
seriation,
4342
testthat (>= 3.0.0)

R/aaa.R

-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,3 @@ expect_netrankr <- function(...) {
3030
expect_seriation <- function(...) {
3131
rlang::check_installed('seriation', ...)
3232
}
33-
expect_netswan <- function(...) {
34-
rlang::check_installed('NetSwan', ...)
35-
}

R/node.R

+9-9
Original file line numberDiff line numberDiff line change
@@ -267,27 +267,27 @@ node_effective_network_size <- function() {
267267
graph <- .G()
268268
influenceR::ens(graph)[focus_ind(graph, 'nodes')]
269269
}
270-
#' @describeIn node_measures measures the impact on connectivity when removing the node (`NetSwan`)
270+
#' @describeIn node_measures measures the impact on connectivity when removing the node (`netrankr`)
271271
#' @export
272272
node_connectivity_impact <- function() {
273-
expect_netswan()
273+
expect_netrankr()
274274
expect_nodes()
275275
graph <- .G()
276-
NetSwan::swan_connectivity(graph)[focus_ind(graph, 'nodes')]
276+
netrankr::swan_connectivity(graph)[focus_ind(graph, 'nodes')]
277277
}
278-
#' @describeIn node_measures measures the impact on closeness when removing the node (`NetSwan`)
278+
#' @describeIn node_measures measures the impact on closeness when removing the node (`netrankr`)
279279
#' @export
280280
node_closeness_impact <- function() {
281-
expect_netswan()
281+
expect_netrankr()
282282
expect_nodes()
283283
graph <- .G()
284-
NetSwan::swan_closeness(graph)[focus_ind(graph, 'nodes')]
284+
netrankr::swan_closeness(graph)[focus_ind(graph, 'nodes')]
285285
}
286-
#' @describeIn node_measures measures the impact on fareness (distance between all node pairs) when removing the node (`NetSwan`)
286+
#' @describeIn node_measures measures the impact on fareness (distance between all node pairs) when removing the node (`netrankr`)
287287
#' @export
288288
node_fareness_impact <- function() {
289-
expect_netswan()
289+
expect_netrankr()
290290
expect_nodes()
291291
graph <- .G()
292-
NetSwan::swan_efficiency(graph)[focus_ind(graph, 'nodes')]
292+
netrankr::swan_efficiency(graph)[focus_ind(graph, 'nodes')]
293293
}

man/node_measures.Rd

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)