-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
63 lines (52 loc) · 2.79 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# netUtils <img src="man/figures/logo.png" align="right"/>
<!-- badges: start -->
[](https://CRAN.R-project.org/package=netUtils)
[](https://CRAN.R-project.org/package=netUtils)
[](https://github.com/schochastics/netUtils/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/schochastics/netUtils)
<!-- badges: end -->
netUtils is a collection of tools for network analysis that may not deserve a package on their own and/or are missing from other network packages.
## Installation
You can install the development version of netUtils with:
```{r install, eval=FALSE}
# install.packages("remotes")
remotes::install_github("schochastics/netUtils")
```
## Functions
most functions only support igraph objects
**helper/convenience functions**
`biggest_component()` extracts the biggest connected component of a network.
`delete_isolates()` deletes vertices with degree zero.
`bipartite_from_data_frame()` creates a two mode network from a data frame.
`graph_from_multi_edgelist()` creates multiple graphs from a typed edgelist.
`clique_vertex_mat()` computes the clique vertex matrix.
`graph_cartesian()` computes the Cartesian product of two graphs.
`graph_direct()` computes the direct (or tensor) product of graphs.
`str()` extends str to work with igraph objects.
**methods**
`dyad_census_attr()` calculates dyad census with node attributes.
`triad_census_attr()` calculates triad census with node attributes.
`core_periphery()` fits a discrete core periphery model.
`graph_kpartite()` creates a random k-partite network.
`split_graph()` sample graph with perfect core periphery structure.
`sample_coreseq()` creates a random graph with given coreness sequence.
`sample_pa_homophilic()` creates a preferential attachment graph with two groups of nodes.
`sample_lfr()` create LFR benchmark graph for community detection.
`structural_equivalence()` finds structurally equivalent vertices.
`reciprocity_cor()` reciprocity as a correlation coefficient.
**methods to use with caution**
*(this functions should only be used if you know what you are doing)*
`as_adj_list1()` extracts the adjacency list faster, but less stable, from igraph objects.
`as_adj_weighted()` extracts the dense weighted adjacency matrix fast.