{roxytest}
m
argument into p
for generate_random()
, p
can now be passed an integer to indicate the number of ties the network should haveto_edges()
to be ~26 times faster on averageto_edges()
to_subgraph()
now instead of dplyr::filter()
or strain()
times
argument instead of maxiter
"measure"
class "node_measure"
and added "graph_measure"
class with print methodnormalized
is now the second argumentdirected
and weights
arguments have been removed and are now imputed, if this is undesired please use to_*()
firstnode_degree()
now calculates strength centrality if network is weightednode_eigenvector()
and graph_eigenvector()
both work with two-mode networksedge_degree()
and edge_eigenvector()
, which both just apply the corresponding nodal measure to the edge graphedge_mutual()
renamed to edge_reciprocal()
graph_assortativity()
mpn_elite_mex
ison_brandes
is_multiplex.igraph()
and is_multiplex.tbl_graph()
now checks for multiple edge attributesstrain()
as wrapper for {dplyr}
’s filter()
, renamed to avoid conflicts with {stats}
ison_algebra
now unlabelled{readxl}
is now suggested, but required if importing from an Excel sheet{patchwork}
replaces {gridExtra}
to make for more concise multiplot visualisations{dplyr}
also serves to export {magrittr}
’s pipe{RColorBrewer}
has been dropped and the Dark2
discrete set of colors is now internaldirected
and direction
arguments in some functions; whereas directed
is always logical (TRUE/FALSE), direction
expects a character string, e.g. “in”, “out”, or “undirected”generate_permutation()
now has an additional logical argument, with_attr
, that indicates whether any attributes from the original data should be passed to the permuted objectcreate_*()
functions now accept existing objects as their first argument and will create networks with the same dimensionsread_pajek()
now imports nodal attributes alongside the main edgesread_ucinet()
now enjoys clearer documentationas_*()
functions now retain weights where present; if you want an unweighted result, use is_unweighted()
afterwards
as_edgelist.network()
now better handles edge weightsas_matrix.igraph()
now better handles edge signsis_twomode()
, is_directed()
, is_weighted()
, is_labelled()
, is_signed()
, is_multiplex()
, is_complex()
, and is_graph()
as_edgelist()
, and to_unweighted()
, and improved the data.frame method for as_matrix()
to_named()
and to_unsigned()
to_edges()
for creating adjacency matrices using a network’s edges as nodesproject_rows()
and project_cols()
functions to to_mode1()
and to_mode2()
, which is both more consistent with other functions naming conventions and more generic by avoiding the matrix-based row/column distinctionnode_mode()
, which returns a vector of the mode assignments of the nodes in a networkedge_signs()
, which returns a vector of the sign assignments of the edges in a networkautographr()
works and how {ggraph}
extends thisautographr()
now incorporates ggidentify()
functionality (closed #150){patchwork}
is now used to assemble multiple plots togetherggatyear()
measure
class and directed most node_*()
functions to create objects of this class
ggdistrib()
and offers “hist” and “dens” methods for histograms and density plots respectivelyedge_betweenness()
wraps {igraph}
’s function of the same nameedge_closeness()
measures the closeness centrality of nodes in an edge adjacencynode_cuts()
identifies articulation points (nodes) in a networkedge_bridges()
identifies edges that serve as bridges in a networkgraph_cohesion()
measures how many nodes would need to be removed to increase the number of components (closed #192)graph_adhesion()
measures how many edges would need to be removed to increase the number of componentsgraph_length()
measures the average path lengthgraph_diameter()
measures the longest path lengthnode_smallworld()
and added graph_smallworld()
, which works with both one- and two-mode networks (fixed #214)node_quad_census()
network_reg()
’s formula-based system
network_reg()
can now handle binary and multiple categorical variables (factors and characters, closed #211);network_reg()
can now manage interactions specified in the common syntax; var1 * var2
expands to var1 + var2 + var1:var2
(closed #163)dist()
and sim()
effects have been added (closed #207)network_reg()
now employs logistic regression to estimate a binary outcome and linear regression to estimate a continuous outcome (closed #184)network_reg()
now uses Dekker et al’s semi-partialling procedure by default for multivariate specifications (closed #206), defaulting to y-permutations in the case of a single predictor (closed #208)network_reg()
, relying on {furrr}
for potential parallelisation and {progressr}
for progress reports (closed #185, #186)test_random()
and test_permutation()
, relying on {furrr}
for potential parallelisation and {progressr}
for progress reports; note that nSim
argument now times
(closed #199){broom}
S3 methods for netlm
and netlogit
class objects (closed #183)
tidy()
extracts coefficients and related valuesglance()
extracts model-level values such as R^2
netlm
and netlogit
class objects (closed #216), which plots the empirical distribution for each test statistic, indicates percentiles relating to common critical values, and superimposes the observed coefficientscug_test
and qap_test
class objects, which plots the empirical distribution, highlighting tails beyond some critical value (closed #213), and superimposing the observed coefficient and, possibly, 0{sna}
print.block_model()
replaces print.blockmodel()
plot.block_model()
replaces plot.blockmodel()
ison_southern_women
instead of southern_women
ison_brandes
instead of brandes
ison_networkers
instead of ison_eies
ison_algebra
instead of ison_m182
ison_adolescents
instead of ison_coleman
mpn_elite_mex
is extended with data from Pajek and with help from Frank Heberison_networkers
becomes named with information from {tnet}
mpn_*
and ison_*
datasets, including references/sourcescluster_structural_equivalence()
for isolates
{patchwork}
to suggested packages in DESCRIPTIONadd_
functions
mutate_edges()
add_node_attributes()
is_
methods: is_multiplex()
, is_uniplex()
, is_acyclic()
edge_
functions to identify edges by properties: edge_mutual()
, edge_multiple()
, edge_loop()
read_nodelist()
and read_edgelist()
as_network()
method to convert correctly form an {igraph}
to a {network}
object.ggraphgrid()
documentationread_edgelist()
and read_nodelist()
to readxl to avoid Java dependencywrite_edgelist()
and write_nodelist()
to avoid Java dependency
as_network()
, as_igraph()
, and is_directed()
read_
and write_
functions and updated documentation
read_edgelist()
for importing edgelists from Excel and csv filesread_pajek()
for importing .net and .paj fileswrite_edgelist()
, write_nodelist
, write_pajek()
, and write_ucinet()
for exporting into various file formats (Excel, csv, Pajek, and UCINET)is_graph()
to check if an object is a graph or notas_network()
to retain attributesas_
and to_
functions
as_
functions to convert from dataframes instead of tibblesas_igraph()
functionto_undirected()
function to work with network objectsto_main_component()
function so that it retains vertex attributes in network objectsedge_attribute()
to grab a named edge attribute from a graph/networkto_unweighted()
to prevent conversion of network object into igraph object when deleting weightssummarise_statistics()
network_reg()
exampleautographr()
ison_eies
dataset for use in practical 7 vignetteas_matrix()
method for networks now works with two-mode and weighted networksas_igraph()
method for matrices now checks for weights independently of coercionas_igraph()
method for networks now works with two-mode and weighted networksas_network()
method for matrices now works with two-mode and weighted networksas_network()
method for edgelists, igraph, and tidygraphs now works with weighted networksto_unnamed()
method for edge liststo_simplex()
method for matricesto_main_component()
method for networksto_multilevel()
method for matricesmutate_edges()
now coalesces rows of edgesgraph_blau_index()
generate_permutation()
and thus test_permutation()
netlm()
to network_reg()
to avoid frustrating conflicts
network_reg()
now accepts migraph-consistent objectsnetwork_reg()
now accepts formula terms such as ego()
, alter()
, and same()
generate_permutation()
which takes an object and returns an object with the edges permuted, but retaining all nodal attributesgenerate_random()
also work with an existing object as input, in which it will return a random graph with the same dimensions and densitymutate_edges()
for adding new edges as attributes to existing edges in an objectgraph_blau_index()
graph_ei_index()
test_random()
(defunct test_cug()
)autographr()
arguments take variable names in quotation marksnode_names()
for quickly accessing node labelsnode_attribute()
for quickly accessing a certain nodal attributeedge_weights()
for quickly accessing edge weightsgraph_nodes()
for quickly accessing a count of nodes in the graph, note that for two-mode networks this will be a vector of length 2graph_edges()
for quickly accessing a count of edges in the graphgraph_dimensions()
is currently a copy of graph_nodes()
add_node_attributes()
for adding particular nodal attributesadd_edge_attributes()
for adding edges from another graphcopy_edge_attributes()
for copying all nodal attributes from another graphgraph_blau_index()
for summarising diversity of an attribute in a network or groupgraph_ei_index()
for summarising diversity of an attribute over a network’s tiesnode_quad_census()
, especially useful for two-mode blockmodellinggraph_mixed_census()
test_random()
carries out a conditional uniform graph (CUG) testtest_permutation()
carries out a quadratic assignment procedure (QAP) testaes()
from {ggplot2}
node_shape
option to autographr()
as_edgelist()
methods for converting other objects into edgelists
to_unnamed()
on ‘network’ objects now operates on them directlyto_
documentation significantlyto_onemode()
that was tripping blockmodel()
on networks that are already one-modeis_connected()
to test whether network is connected, method =
argument can be specified as weak
or strong
create_tree()
and create_lattice()
, and made create_star()
a bit faster for one-mode networksgenerate_smallworld()
and generate_scalefree()
, though only for one-mode networks currently=2
graph_dyad_census()
for more graph profile optionsblockmodel_concor()
when an object was of class ‘igraph’ but not ‘tbl_graph’blockmodel()
was treating two-mode networks"elbow"
and "strict"
methods for k-identification
ggidentify_clusters()
for speed
ggdistrib()
for easy plotting of degree and other node score distributionsggsave()
, xlab()
and ylab()
from {ggplot2}
for easier plot annotationas_matrix()
where availablegraph_equivalency()
into the same for two-mode networks and graph_congruency()
for three-mode (two two-mode) networksgraph_reciprocity()
methodgraph_components()
and node_components()
node_tie_census()
output so that it’s consistent with node_triad_census()
and future node_census functionscluster_triad_census()
to group_triad_census()
group_tie_census()
autographr()
for plotting convex/concave hullsggraphgrid()
a set of layout functions:
layout_tbl_graph_frgrid()
or autographr(object, "frgrid")
for snapping Fruchterman-Reingold to a gridlayout_tbl_graph_kkgrid()
or autographr(object, "kkgrid")
for snapping Kamada-Kawai to a gridlayout_tbl_graph_gogrid()
or autographr(object, "gogrid")
for snapping graph optimisation to a gridggraphgrid()
has been deprecatedison_m182
documentationas_igraph()
to_uniplex()
was not returning a weighted graphblockmodel()
was not retaining node names in all parts of the object structureplot_releases()
to another packageis_signed()
to logically test whether the network is a signed networkto_unsigned()
for extracting networks of either “positive” or “negative” ties from a signed networktbl_graph
methods for all other to_
functionsactivate()
from {tidygraph}
autographr()
plot_releases()
from this packagegraph_balance()
to be much faster, following David Schoch’s {signnet}
package (see that package for further extensions)ison_marvel_relationships
to be a double (-1
/1
) to be compatible with the new graph_balance()
and {signnet}
{igraph}
from data frames and updated read scriptto_main_component()
to extract the main component of a networkto_onemode()
for moving to multimodal igraph objectsto_uniplex()
method to delete edge types and their edges from multiplex networksto_simplex()
method to delete loops from a networkto_named()
method for randomly naming unlabeled networksison_mm
, ison_mb
, ison_bm
, and ison_bb
projection illustration dataison_karateka
community detection illustration dataison_marvel_teams
and ison_marvel_relationships
datasetsison_m182
dataset of friends, social and task ties between 16 anonymous studentsadolescent_society
dataset to ison_coleman
for consistencygraph_eigenvector()
for one mode networksgraph_balance()
for measuring structural balancenode_tie_census()
, node_triad_census()
, cluster_triad_census()
, and graph_triad_census()
graph_clustering()
into the cohesion measures graph_density()
, graph_reciprocity()
, graph_transitivity()
, and graph_equivalence()
node_smallworld()
to use separated cohesion measuresblockmodel()
which masks its {sna}
namesake but has the advantages of working with two-mode networks and retaining node names where available
cluster_structural_equivalence()
and cluster_regular_equivalence()
as bases for blockmodellingreduce_graph()
for creating a network from a blockmodelautographr()
for plotting graphs with sensible defaults
ggraphlabel()
since core functionality now provided by autographrggidentify()
to identify the node with the highest value of a specified node-level measureggatyear()
for subsetting and plotting edgelists at yeargglineage()
to return a graph colored according to lineage
ggtree()
for neatly visualising hierarchical clustersggidentify_clusters()
for identifying which number of clusters is most appropriate following the elbow methodggraph::theme_graph()
present in a few different visualisation functionsbrandes
dataset for teaching centrality measuresadolescent_society
dataset for teaching friendship paradoxread_edgelist()
for importing Excel-created edgelists directlyggraphlabel()
for one-function (1F) plotting label-based network graphsggevolution()
for 1F-plotting begin/end graph comparisonsggraphgrid()
for 1F snap-to-grid graph layouts based on Fruchterman-Reingold or Kamada-Kawaiggidentify()
for 1F identifying nodes with maximum scores based on some arbitrary functionto_undirected()
for symmetrising networks of all typesto_
functions S3 methodsClosed #100 by converting as_
coercion functions to S3 methods
as_matrix()
weightingas_tidygraph()
gglineage()
for graphing a citation network through timeggevolution()
for graphing two timepoints of the same network side by sideggraphgrid()
for locking a graph to a gridplot.igraph()
defaultsnode_
functionsFixed bug in as_matrix()
with frame matrix by dropping (rarely necessary) functionality
as_
functionsFixed bugs in plot_releases()
with more graceful handling of http errors
{R6}
, {ggraph}
)netlm()
testbinarise()
to to_unweighted()
to_unnamed()
for unlabelling networksbinarise()
for unweighting networksas_tidygraph()
when passed a tbl_graph directlyplot_releases()
for more general useplot.igraph()
with layouts and one-mode graphsUpdated README
Added CITATION
details
Separated coercion (previously conversion) and manipulation
Added some more inter-class coercion tests
Fixed bug in how as_network()
sometimes coerced two-mode networks into much larger dimension matrices
Added more is_
tests for class-independent property tests
is_weighted()
is_directed()
is_labelled()
Added @csteglich ’s read_ucinet()
and write_ucinet()
functions
read_ucinet()
offers a file-picker when file path unknownread_ucinet()
now imports to an igraph-class object by default, with an argument to allow other alternativeswrite_ucinet()
works with all migraph-compatible objectsUpdated mpn_bristol
documentation
Added create_star()
function
directed =
argumentcreate_
documentationRenamed sample_affiliation()
to generate_random()
generate_random()
to be able to generate random one- or two-mode networksprint.blockmodel()
2021-04-13
usethis::use_mit_license("James Hollway")
. MIT License file now contains only the standard two lines.\dontrun
from examples. netlm()
now runs in <5 seconds.2021-04-11
as_network()
to coerce objects into network class2021-03-03
jhollway/
to snlab-ch/
organisationElaborated documentation for the remainder of the datasets
graph_degree()
where data was hard-coded inClosed #18 by adding blockmodel_concor()
for employing the CONCOR algorithm to blockmodel both one-mode and two-mode networks
print.blockmodel()
method in the {sna}
package that also prints blockmodel results for two-mode networks consistently{ggplot2}
for pretty plotting and that better inherits names from the underlying object2021-02-06
{migraph}
depend on R versions 4.0 or aboveas_matrix()
function to coerce objects into an adjacency or incidence matrix classas_igraph()
function to coerce objects into an {igraph}
graph classas_tidygraph()
function to coerce objects into an {tidygraph}
tbl_graph classis_twomode()
function to check whether network is two-mode on all object typesRenamed several datasets and elaborated their documentation
mpn_mexicanpower
was renamed to mpn_elite_mex
mpn_powerelite
was renamed to mpn_elite_usa_advice
mpn_opensecrets
was renamed to mpn_elite_usa_money
Reconstructed several creation functions to take universal (one-mode/two-mode) input: specifying n = 5
creates a one-mode network, while specifying n = c(5, 5)
creates a two-mode network
create_empty()
create_complete()
create_ring()
to create rings of varying breadthcreate_components()
(renamed from create_silos()
) to create networks with varying numbers of componentssample_affiliation()
for random two-mode networkscreate_match()
and create_nest()
Renamed centrality_
functions with node_
prefix and ensured they all also wrapped one-mode measures
centrality_degree()
renamed to node_degree()
centrality_closeness()
renamed to node_closeness()
centrality_betweenness()
renamed to node_betweenness()
node_eigenvector()
Re-added node_constraint()
for calculating Burt’s constraint measure for one- and two-mode networks
Re-added node_smallworld()
for calculating Watts-Strogatz measure of small-worldness for two-mode networks
Closed #32 by re-adding centralization functions for one- and two-mode networks
graph_degree()
for degree centralizationgraph_closeness()
for closeness centralizationgraph_betweenness()
for betweenness centralizationRe-added graph_clustering()
for calculating (see Knoke et al 2021):
Re-added netlm()
for performing linear regression for multimodal network data
netlm()
to accept a formula-based inputprint.summary.netlm()
for netlm()
regressionsplot.igraph()
with sensible defaults for two-mode networks2021-01-11
{igraph}
and {tidygraph}
functions for internal useconvert_
and project_
documentationAdded centrality measures that take (and if necessary return) matrix, igraph, or tidygraph objects, and offer a correct normalization for two-mode networks
centrality_degree()
centrality_closeness()
centrality_betweenness()
2021-01-08
Package name change from roctopus to {migraph}
Now builds Linux binary too
project_rows()
and project_cols()
to make it easier to project two-mode networks in different formats (matrix, igraph, tidygraph) into projected versions in the same formatas_incidence_matrix()
2020-11-06
Data creation updated for {tidygraph}
defaults
create_lattice()
to create_chain()
to avoid conflicts with tidygraph::create_lattice()
create_poles()
to create_silos()
create_random()
to play_twomode()
to avoid conflicts with tidygraph::play_bipartite()
create_
and play_
functions as tbl_graph
(default), igraph
, and base matrixcreate_
and play_
function namesPackaged data updated for {tidygraph}
defaults
mpn_
2020-08-18
twomode_netlm()
to netlm2()
netlm2()
netlm2()
create_random()
opensecrets
datapowerelite
data2020-07-21
create_()
functionscontext()
declarationcreate_nest()
now exports matrix object2020-07-20
row_project()
and col_project()
functions to make it easier to remember project directions2020-07-19
mexicanpower
datasetsenate112
datasetsevs
datasets to matricesdf_to_mat()
function for converting regular adjacency and incidence data frames into matrices2020-07-17
ryanair
dataset from Christopoulos 20062020-07-03
evs
datasets from Knoke et al 20202020-06-30
bristol
dataset from Knoke et al 20202018-12-20
twomode_modularity()
to calculate modularity in two-mode networksplot_multilevel()
that rotates a force-directed igraph
plot in three dimensions to reveal multilevel structureplot_globalnet()
to map a multilevel network on to a javascript, rotatable global2018-08-25
twomode_smallworld()
to calculate observed/expected clustering, observed/expected path-length, and the observed/expected clustering ratiotwomode_2x2()
to identify dominance and coherence values for networks over timetwomode_coherence()
to allow for introduction of second-mode attributestwomode_fragmentation()
to twomode_components()
plot_2x2()
to plot values through a two-by-two matrix2018-08-14
roctopus
twomode_fragmentation()
to calculate number of components in two-mode networks and identify their membershiptwomode_dominance()
to allow an nodal attribute to be passed to the function to weight the centralization measuretwomode_coherence()
to calculate Jaccard similarityAdded plot_twomode()
, which wraps plot(igraph::graph_from_incidence_matrix())
with some useful defaults
2018-07-30
README.md
file with instructions on how to install packageLICENSE
file and pointed to bug/issue trackerNEWS.md
file to track changes to the packagetwomode_clustering()
to calculate percentage of three-paths closed by four-pathstwomode_lattice()
to create two-mode latticestwomode_centralization_degree()
to calculate degree centralization in two-mode networks, for rows, columns, or bothtwomode_centralization_between()
to calculate betweenness centralization in two-mode networkstwomode_constraint()
to calculate network constraint in two-mode networksarrange.vars()
to rearrange variables by position