Learn R Programming

ProNet (version 1.0.0)

net.attack: Network attack

Description

Retrieve the network after vertex attack.

Usage

net.attack(graph, mode = c("exact", "sample"), sample.number = 10, nodes = NULL, vertex.name = NULL, ...)

Arguments

graph
An igraph object.
mode
Attack mode, possible values are exact and sample.
sample.number
Number of attacked vertex, if mode is sample.
nodes
Index of attacked vertex, if mode is exact.
vertex.name
Name of attacked vertex, if mode is exact.
...
Other arguments.

Value

An igraph object.

Examples

Run this code
g<-barabasi.game(100,power=0.8,directed=FALSE)
g1<-net.attack(g,mode="sample",sample.number=10)
g1<-net.attack(g,mode="exact",nodes=sample(1:100,20))

Run the code above in your browser using DataLab