Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.2.2 #93

Merged
merged 23 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
afd4642
Re-worked `graphr()` to make the function more concise and consistent…
henriquesposito Oct 1, 2024
cca31be
Fixed issues with testing for `graphr()` and themes
henriquesposito Oct 1, 2024
8834563
Added gifs to centrality tute
jhollway Oct 2, 2024
6e9281f
Merge branch 'develop' of https://github.com/stocnet/manynet into dev…
jhollway Oct 2, 2024
9630d14
Updated theme in early tutorials
jhollway Oct 2, 2024
4eb3929
Updated theme in later tutorials
jhollway Oct 2, 2024
436c147
Added more detail to closeness centrality documentation
jhollway Oct 2, 2024
c2e3bf0
Updated themes in middle tutorials
jhollway Oct 2, 2024
97b66bc
#patch bump for now
jhollway Oct 2, 2024
64e4d8d
Fixed issues with `graphr()` related to examples
henriquesposito Oct 2, 2024
7da0dd6
Added node_eccentricity
jhollway Oct 2, 2024
2f5d848
Merge branch 'develop' of https://github.com/stocnet/manynet into dev…
jhollway Oct 2, 2024
b0fe843
Added to_dominating()
jhollway Oct 2, 2024
f60ac55
node_eccentricity() now a (closeness) centrality measure
jhollway Oct 2, 2024
8e9bbb0
Added node_stress() and updated documentation on betweenness, induced…
jhollway Oct 2, 2024
00f9827
Added node_leverage()
jhollway Oct 2, 2024
8b578a3
Updated centrality tutorial
jhollway Oct 2, 2024
62e0d03
Made `graphr()` more explicity about when to map edge aestehtics vers…
henriquesposito Oct 3, 2024
32a30bd
Updated eccentricity documentation
jhollway Oct 4, 2024
241b1b8
Small edits to visualization tutorial
jhollway Oct 4, 2024
889f250
Fixed documentation issues
jhollway Oct 4, 2024
144e815
Avoided hard coding comic book characters into line types
jhollway Oct 4, 2024
242179c
Updated NEWS and #patch bump
jhollway Oct 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: manynet
Title: Many Ways to Make, Modify, Map, Mark, and Measure Myriad Networks
Version: 1.2.1
Date: 2024-10-01
Version: 1.2.2
Date: 2024-10-04
Description: Many tools for making, modifying, mapping, marking, measuring,
and motifs and memberships of many different types of networks.
All functions operate with matrices, edge lists, and 'igraph', 'network', and 'tidygraph' objects,
Expand Down
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ export(node_is_recovered)
export(node_kernighanlin)
export(node_leading_eigen)
export(node_leiden)
export(node_leverage)
export(node_louvain)
export(node_mode)
export(node_multidegree)
Expand All @@ -616,6 +617,7 @@ export(node_regular_equivalence)
export(node_richness)
export(node_roulette)
export(node_spinglass)
export(node_stress)
export(node_strong_components)
export(node_structural_equivalence)
export(node_thresholds)
Expand Down Expand Up @@ -712,6 +714,7 @@ export(to_blocks)
export(to_components)
export(to_correlation)
export(to_directed)
export(to_dominating)
export(to_ego)
export(to_egos)
export(to_eulerian)
Expand Down Expand Up @@ -835,7 +838,6 @@ importFrom(igraph,delete_vertex_attr)
importFrom(igraph,delete_vertices)
importFrom(igraph,diameter)
importFrom(igraph,distances)
importFrom(igraph,eccentricity)
importFrom(igraph,edge_attr)
importFrom(igraph,edge_attr_names)
importFrom(igraph,edge_betweenness)
Expand Down
24 changes: 24 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# manynet 1.2.2

## Package

- Updated all tutorials with different themes to make them more distinctive
- Updated centrality tutorial with gifs
- Updated visualisation tutorial with a few extras

## Modifying

- Added `to_dominating()` for extracting the dominating tree of a given network

## Mapping

- Reworked `graphr()` to make function more concise and consistent (thanks @henriquesposito)
- This allows new functionality and improves debugging moving forward

## Measuring

- Updated closeness centrality documentation
- Improved `node_eccentricity()` to allow normalisation, appear in closeness documentation
- Added `node_stress()` as a new betweenness-like centrality measure
- Added `node_leverage()` as a new degree-like centrality measure

# manynet 1.2.1

## Making
Expand Down
15 changes: 14 additions & 1 deletion R/manip_reformed.R
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ to_blocks.tbl_graph <- function(.data, membership, FUN = mean){
#' - `to_eulerian()` returns only the Eulerian path within some network data.
#' - `to_tree()` returns the spanning tree in some network data or,
#' if the data is unconnected, a forest of spanning trees.
#' - `to_dominating()` returns the dominating tree of the network
#' @details
#' Not all functions have methods available for all object classes.
#' Below are the currently implemented S3 methods:
Expand Down Expand Up @@ -651,5 +652,17 @@ to_eulerian.tbl_graph <- function(.data){
#' @export
to_tree <- function(.data) {
.data <- as_igraph(.data)
igraph::subgraph.edges(.data, igraph::sample_spanning_tree(.data))
out <- igraph::subgraph.edges(.data, igraph::sample_spanning_tree(.data))
as_tidygraph(out)
}

#' @rdname manip_paths
#' @param from The index or name of the node from which the path should be traced.
#' @param direction String, either "out" or "in".
#' @export
to_dominating <- function(.data, from, direction = c("out","in")) {
direction <- match.arg(direction)
.data <- as_igraph(.data)
out <- igraph::dominator_tree(.data, root = from, mode = direction)$domtree
as_tidygraph(out)
}
890 changes: 423 additions & 467 deletions R/map_autograph.R

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions R/mark_ties.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ tie_is_bridge <- function(.data){
}

#' @rdname mark_ties
#' @param from The index or name of the node from which the path should be traced.
#' @inheritParams manip_paths
#' @param to The index or name of the node to which the path should be traced.
#' @param all_paths Whether to return a list of paths or sample just one.
#' By default FALSE, sampling just a single path.
#' @importFrom igraph all_shortest_paths
#' @examples
#' ison_adolescents %>% mutate_ties(route = tie_is_path(from = "Jane", to = 7)) %>%
#' graphr(edge_colour = "route")
#' ison_adolescents %>%
#' mutate_ties(route = tie_is_path(from = "Jane", to = 7)) %>%
#' graphr(edge_colour = "route")
#' @export
tie_is_path <- function(.data, from, to, all_paths = FALSE){
if(missing(.data)) {expect_edges(); .data <- .G()}
Expand Down
Loading
Loading