Learn R Programming

netdep (version 0.1.0)

snowball.sampling: Snowball sampling

Description

Sampling from one graph to its induced subgraph depending on network structure.

Usage

snowball.sampling(G, samn)

Arguments

G

an igraph object.

samn

is a size of snowball sample that will be samples from G.

Value

subG

an induced subgraph of G sampled using snowball sampling.

ind

a set of index of samples.

Examples

Run this code
# NOT RUN {
library(netdep)
library(igraph)
G = latent.netdep(n.node = 200, rho = 0.2, dep.factor = -3, dep.range = c(-10, 0))
subG = snowball.sampling(G, 100)

# }

Run the code above in your browser using DataLab