Skip to content

Commit

Permalink
Merge pull request #257 from snlab-ch/develop
Browse files Browse the repository at this point in the history
0.13.0
  • Loading branch information
jhollway authored Nov 30, 2022
2 parents 4cf10c2 + 291471e commit a5a9fa5
Show file tree
Hide file tree
Showing 38 changed files with 3,807 additions and 296 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: migraph
Title: Tools for Multimodal Network Analysis
Version: 0.12.6
Date: 2022-11-09
Version: 0.13.0
Date: 2022-11-30
Description: A set of tools for analysing multimodal networks.
All functions operate with matrices, edge lists,
and 'igraph', 'network', and 'tidygraph' objects,
Expand All @@ -19,7 +19,7 @@ License: MIT + file LICENSE
Language: en-GB
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.2.2
Imports:
BiocManager,
dplyr,
Expand All @@ -44,6 +44,7 @@ Suggests:
covr,
ggdendro,
knitr,
minMSE,
oaqc,
readxl,
Rgraphviz,
Expand Down
32 changes: 32 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ S3method(is_weighted,network)
S3method(is_weighted,tbl_graph)
S3method(mutate,igraph)
S3method(plot,diff_model)
S3method(plot,diffs_model)
S3method(plot,graph_test)
S3method(plot,learn_model)
S3method(plot,matrix)
S3method(plot,netlm)
S3method(plot,netlogit)
Expand All @@ -100,9 +102,11 @@ S3method(plot,node_measure)
S3method(plot,node_member)
S3method(plot,tie_measure)
S3method(print,diff_model)
S3method(print,diffs_model)
S3method(print,graph_measure)
S3method(print,graph_motif)
S3method(print,graph_test)
S3method(print,learn_model)
S3method(print,network_measure)
S3method(print,network_motif)
S3method(print,network_test)
Expand All @@ -113,6 +117,8 @@ S3method(print,node_motif)
S3method(print,tie_mark)
S3method(print,tie_measure)
S3method(summary,diff_model)
S3method(summary,diffs_model)
S3method(summary,learn_model)
S3method(summary,node_measure)
S3method(summary,node_motif)
S3method(tidy,netlm)
Expand All @@ -127,6 +133,16 @@ S3method(to_blocks,igraph)
S3method(to_blocks,matrix)
S3method(to_blocks,network)
S3method(to_blocks,tbl_graph)
S3method(to_components,data.frame)
S3method(to_components,igraph)
S3method(to_components,matrix)
S3method(to_components,network)
S3method(to_components,tbl_graph)
S3method(to_egos,data.frame)
S3method(to_egos,igraph)
S3method(to_egos,matrix)
S3method(to_egos,network)
S3method(to_egos,tbl_graph)
S3method(to_giant,data.frame)
S3method(to_giant,igraph)
S3method(to_giant,matrix)
Expand Down Expand Up @@ -171,6 +187,9 @@ S3method(to_subgraph,igraph)
S3method(to_subgraph,matrix)
S3method(to_subgraph,network)
S3method(to_subgraph,tbl_graph)
S3method(to_subgraphs,igraph)
S3method(to_subgraphs,network)
S3method(to_subgraphs,tbl_graph)
S3method(to_ties,data.frame)
S3method(to_ties,igraph)
S3method(to_ties,matrix)
Expand Down Expand Up @@ -221,6 +240,7 @@ export(as_matrix)
export(as_network)
export(as_tidygraph)
export(autographr)
export(autographs)
export(bind_edges)
export(cluster_concor)
export(cluster_hierarchical)
Expand Down Expand Up @@ -292,6 +312,7 @@ export(is.igraph)
export(is.network)
export(is.tbl_graph)
export(is_acyclic)
export(is_aperiodic)
export(is_bipartite)
export(is_complex)
export(is_connected)
Expand Down Expand Up @@ -347,6 +368,7 @@ export(network_node_attributes)
export(network_nodes)
export(network_reciprocity)
export(network_reg)
export(network_richness)
export(network_scalefree)
export(network_smallworld)
export(network_tie_attributes)
Expand Down Expand Up @@ -390,6 +412,7 @@ export(node_reach)
export(node_reciprocity)
export(node_redundancy)
export(node_regular_equivalence)
export(node_richness)
export(node_strong_components)
export(node_structural_equivalence)
export(node_tie_census)
Expand All @@ -398,6 +421,8 @@ export(node_triad_census)
export(node_walktrap)
export(node_weak_components)
export(play_diffusion)
export(play_diffusions)
export(play_learning)
export(read_edgelist)
export(read_nodelist)
export(read_pajek)
Expand All @@ -421,7 +446,9 @@ export(tie_signs)
export(tie_weights)
export(to_anti)
export(to_blocks)
export(to_components)
export(to_edges)
export(to_egos)
export(to_giant)
export(to_main_component)
export(to_matching)
Expand All @@ -433,6 +460,7 @@ export(to_onemode)
export(to_redirected)
export(to_simplex)
export(to_subgraph)
export(to_subgraphs)
export(to_ties)
export(to_twomode)
export(to_undirected)
Expand Down Expand Up @@ -470,6 +498,7 @@ importFrom(ggplot2,arrow)
importFrom(ggplot2,coord_flip)
importFrom(ggplot2,element_blank)
importFrom(ggplot2,element_text)
importFrom(ggplot2,geom_histogram)
importFrom(ggplot2,geom_hline)
importFrom(ggplot2,geom_tile)
importFrom(ggplot2,geom_vline)
Expand Down Expand Up @@ -534,6 +563,7 @@ importFrom(igraph,graph.neighborhood)
importFrom(igraph,graph_from_adjacency_matrix)
importFrom(igraph,graph_from_data_frame)
importFrom(igraph,graph_from_incidence_matrix)
importFrom(igraph,induced_subgraph)
importFrom(igraph,is.bipartite)
importFrom(igraph,is.connected)
importFrom(igraph,is.directed)
Expand All @@ -546,6 +576,7 @@ importFrom(igraph,is_bipartite)
importFrom(igraph,is_dag)
importFrom(igraph,list.edge.attributes)
importFrom(igraph,list.vertex.attributes)
importFrom(igraph,make_ego_graph)
importFrom(igraph,make_lattice)
importFrom(igraph,make_line_graph)
importFrom(igraph,make_star)
Expand Down Expand Up @@ -574,6 +605,7 @@ importFrom(network,as.network)
importFrom(network,is.network)
importFrom(network,read.paj)
importFrom(patchwork,plot_layout)
importFrom(patchwork,wrap_plots)
importFrom(purrr,flatten)
importFrom(rlang,":=")
importFrom(rlang,.data)
Expand Down
69 changes: 69 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
# migraph 0.13.0

## Package

- Added hints and questions to community tutorial
- Added diffusion tutorial

## Marks

- Added `is_aperiodic()` for testing whether a network is aperiodic
(the greatest common divisor for all cycles in the network is 1)
- Note that for computational efficiency, this will check only up to a specified
path length (by default 4)
- `node_is_max()` and `node_is_min()` now take a "rank" argument for selecting more
than the first ranked maxima or minima

## Manipulations

- Added several new functions for splitting networks into a list of networks
- Added `to_components()` to return the components of a network as a list of networks
- Added `to_egos()` to return the ego networks of a network as a list of networks
- Added `to_subgraphs()` to return attribute-based subgraphs as a list of networks

## Measures

- Added `network_richness()` and `node_richness()` for calculating the richness
(a common diversity measure) of an attribute in a network

## Models

- Extended `play_diffusion()` to include more compartment and transition options
- The print method now tabulates the compartment sums per step
- The summary method now presents the diffusion event list
- The plot method now:
- plots lines for S and I compartments, as blue and red lines respectively,
if available or informs the user if no diffusion could be simulated
- plots lines for E and R compartments, as orange and green lines respectively, if relevant
- plots a bar graph behind showing the number of new infections per step
- Added "transmissibility" parameter to allow for more probabilistic contagion,
by default 1 (all contacts over the threshold result in contagion)
- Added "latency" parameter to allow for an Exposed compartment to be included,
by default 0 (no incubation period)
- Added "recovery" rate parameter to allow for a Recovered compartment to be included,
by default 0 (no recovery)
- Added "waning" parameter to allow for returns to the Susceptible compartment,
by default 0 (any recovered have lifelong immunity)
- Added "immune" parameter to allow for issuing of targetted vaccinations or related
- "thresholds" can now be proportions, in which case they are interpreted as complex
- "seeds" is now 1 by default
- Added `play_diffusions()` for running a diffusion model multiple times
- Note for accelerating documentation and tutorials, this is 5 by default,
but for publication quality results this should be increased
- A print method tabulates the compartment sums per step per simulation
- A summary method tabulates the steps until complete infection (or recovery)
for each simulation
- A plot method visualises the loess for each compartment across all simulations
- Note that this function uses `{furrr}` and so a multicore or multisession strategy
can be used for parallelisation (but this only makes sense for many simulations)
- Added `play_learning()` for running a DeGroot learning model
- A print method tabulates nodes beliefs at each step
- A summary method informs how many steps it took until convergence or
whether there was no convergence after _t_ steps
- A plot method visualises the belief trajectories for each node
- `network_reg()` now declares the reference category for nominal variables

## Mapping

- Added `autographs()` for autoplotting lists of networks

# migraph 0.12.6

## Package
Expand Down
Loading

0 comments on commit a5a9fa5

Please sign in to comment.