clean_graph: Clean Graph

Description Usage Arguments Value Author(s) Examples

View source: R/clean_graph.R

Description

Remove graph nodes by residing subgraph sizes, vertex names and PageRank values.

Usage

1
clean_graph(graph, size = NULL, vertices = NULL, pagerank = NULL)

Arguments

graph

(igraph) The graph to be cleaned.

size

(numeric) Subgraph size cutoff.

vertices

(character) Vertices to be kept.

pagerank

(numeric) PageRank cutoff.

Value

(igraph) Network updated "pagerank" as vertex attribute.

Author(s)

DING, HONGXU (hd2326@columbia.edu)

Examples

1
2
3
4
5
6
library(igraph)
set.seed(1)
graph <- igraph::erdos.renyi.game(100, 0.01, directed = TRUE)
igraph::V(graph)$name <- 1:100
igraph::V(graph)$pagerank <- igraph::page_rank(graph)$vector
clean_graph(graph, size=5)

pageRank documentation built on Nov. 8, 2020, 6:52 p.m.