|
a |
|
b/man/c_net_stability.Rd |
|
|
1 |
% Generated by roxygen2: do not edit by hand |
|
|
2 |
% Please edit documentation in R/7.stability.R |
|
|
3 |
\name{c_net_stability} |
|
|
4 |
\alias{c_net_stability} |
|
|
5 |
\alias{robust_test} |
|
|
6 |
\alias{vulnerability} |
|
|
7 |
\alias{robustness} |
|
|
8 |
\title{Evaluate the stability of a network} |
|
|
9 |
\usage{ |
|
|
10 |
c_net_stability( |
|
|
11 |
go_ls, |
|
|
12 |
mode = "robust_test", |
|
|
13 |
partial = 0.5, |
|
|
14 |
step = 10, |
|
|
15 |
reps = 9, |
|
|
16 |
threads = 1, |
|
|
17 |
verbose = TRUE, |
|
|
18 |
keystone = FALSE |
|
|
19 |
) |
|
|
20 |
|
|
|
21 |
robust_test( |
|
|
22 |
go_ls, |
|
|
23 |
partial = 0.5, |
|
|
24 |
step = 10, |
|
|
25 |
reps = 9, |
|
|
26 |
threads = 1, |
|
|
27 |
verbose = TRUE |
|
|
28 |
) |
|
|
29 |
|
|
|
30 |
vulnerability(go_ls, threads = 1, verbose = TRUE) |
|
|
31 |
|
|
|
32 |
robustness(go_ls, keystone = FALSE, reps = 9, threads = 1, verbose = TRUE) |
|
|
33 |
} |
|
|
34 |
\arguments{ |
|
|
35 |
\item{go_ls}{an igraph object or igraph list.} |
|
|
36 |
|
|
|
37 |
\item{mode}{"robust_test", "vulnerability", "robustness"} |
|
|
38 |
|
|
|
39 |
\item{partial}{how much percent vertexes be removed in total (default: 0.5, only for robust_test)} |
|
|
40 |
|
|
|
41 |
\item{step}{how many nodes be removed each time? (default: 10, only for robust_test)} |
|
|
42 |
|
|
|
43 |
\item{reps}{simulation number (default: 9)} |
|
|
44 |
|
|
|
45 |
\item{threads}{threads} |
|
|
46 |
|
|
|
47 |
\item{verbose}{verbose} |
|
|
48 |
|
|
|
49 |
\item{keystone}{remove 70\%\% keystones instead of remove 50\%\% nodes (default: False, only for robustness)} |
|
|
50 |
} |
|
|
51 |
\value{ |
|
|
52 |
a data.frame |
|
|
53 |
|
|
|
54 |
data.frame (robustness class) |
|
|
55 |
|
|
|
56 |
a vector |
|
|
57 |
} |
|
|
58 |
\description{ |
|
|
59 |
\deqn{Vi=\frac{E-Ei}{E}} |
|
|
60 |
E is the global efficiency and Ei is the global efficiency after the removal of the node i and its entire links. |
|
|
61 |
} |
|
|
62 |
\examples{ |
|
|
63 |
\donttest{ |
|
|
64 |
data("c_net") |
|
|
65 |
if (requireNamespace("ggpmisc")) { |
|
|
66 |
c_net_stability(co_net, mode = "robust_test", step = 20, reps = 9) -> robust_res |
|
|
67 |
plot(robust_res, index = "Average_degree", mode = 2) |
|
|
68 |
} |
|
|
69 |
|
|
|
70 |
c_net_stability(co_net, mode = "vulnerability") -> vulnerability_res |
|
|
71 |
plot(vulnerability_res) |
|
|
72 |
|
|
|
73 |
robustness(co_net) -> robustness_res |
|
|
74 |
plot(robustness_res) |
|
|
75 |
|
|
|
76 |
module_detect(co_net) -> co_net_modu |
|
|
77 |
zp_analyse(co_net_modu, mode = 2) -> co_net_modu |
|
|
78 |
|
|
|
79 |
c_net_stability(co_net_modu, mode = "robustness", keystone = TRUE) -> robustness_res |
|
|
80 |
plot(robustness_res) |
|
|
81 |
} |
|
|
82 |
} |