Skip to content

Commit

Permalink
all them fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Jan 29, 2024
1 parent 5d3703e commit 8d8787c
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ Suggests:
deldir,
gganimate,
covr,
sf
sf,
sfnetworks
LinkingTo: Rcpp
RoxygenNote: 7.3.1
Depends:
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ importFrom(igraph,simplify)
importFrom(igraph,unfold_tree)
importFrom(igraph,vertex_attr)
importFrom(lifecycle,deprecated)
importFrom(memoise,memoise)
importFrom(rlang,.data)
importFrom(rlang,as_quosure)
importFrom(rlang,enquo)
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
`geom_edge_bundle_minimal()` (+ variants) to provide support for edge bundling
(#267)
* Add "metro" layout from graphlayouts for metroline like layouts
* Add `layout_sf()`, `geom_node_sf()` and `geom_edge_sf()` to support plotting of [`sfnetwork`](https://luukvdmeer.github.io/sfnetworks/) objects (#275)
* Add `layout_sf()`, `geom_node_sf()` and `geom_edge_sf()` to support plotting of
[`sfnetwork`](https://luukvdmeer.github.io/sfnetworks/) objects (#275)

# ggraph 2.1.0

Expand Down
2 changes: 1 addition & 1 deletion R/geom_edge_bundle_force.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,4 @@ force_bundle <- function(data, K, C, P, S, P_rate, I, I_rate, compatibility_thre
)
}

force_bundle_mem <- memoise::memoise(force_bundle)
force_bundle_mem <- memoise(force_bundle)
2 changes: 1 addition & 1 deletion R/geom_edge_bundle_minimal.R
Original file line number Diff line number Diff line change
Expand Up @@ -274,4 +274,4 @@ minimal_bundle <- function(graph, nodes, from, to, max_distortion = 2, weight_fa
data_frame0(x = nodes$x[paths], y = nodes$y[paths], group = ids)
}

minimal_bundle_mem <- memoise::memoise(minimal_bundle)
minimal_bundle_mem <- memoise(minimal_bundle)
2 changes: 1 addition & 1 deletion R/geom_edge_bundle_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,4 @@ path_bundle <- function(graph, nodes, from, to, directed = directed, max_distort
data_frame0(x = nodes$x[paths], y = nodes$y[paths], group = ids)
}

path_bundle_mem <- memoise::memoise(path_bundle)
path_bundle_mem <- memoise(path_bundle)
8 changes: 5 additions & 3 deletions R/geom_node_sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
#' @family geom_node_*
#'
#' @examples
#' library(tidygraph)
#'
#' if (require("sfnetworks", quietly = TRUE)) {
#' gr <- sfnetworks::as_sfnetwork(roxel) %>%
#' mutate(centrality = centrality_betweenness())
#' ggraph(gr, 'sf') + geom_node_sf(aes(color = centrality))
#' gr <- sfnetworks::as_sfnetwork(roxel)
#' ggraph(gr, 'sf') +
#' geom_node_sf(aes(color = centrality_betweenness()))
#' }
#'
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/ggraph-package.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#' @aliases ggraph-package
#' @keywords internal
'_PACKAGE'

# The following block is used by usethis to automatically manage
# roxygen namespace tags. Modify with care!
## usethis namespace: start
#' @import ggplot2 tidygraph rlang vctrs
#' @importFrom memoise memoise
#' @importFrom lifecycle deprecated
#' @importFrom Rcpp sourceCpp
#' @useDynLib ggraph
Expand Down
2 changes: 1 addition & 1 deletion R/layout_stress.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ layout_tbl_graph_stress <- function(graph, weights = NULL, niter = 500,
xy <- cbind(x_coord, y_coord)
if (anyNA(xy)) {
xy <- layout_with_fixed_coords(graph, xy, weights = weights, iter = niter,
tol = tol, mds = mds, bbox = bbox)
tol = tolerance, mds = mds, bbox = bbox)
}
} else {
dim <- if (is.null(x_coord)) "y" else "x"
Expand Down
8 changes: 5 additions & 3 deletions man/geom_node_sf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d8787c

Please sign in to comment.