adjust_graph: Re-calculate PageRank

Description Usage Arguments Value Author(s) Examples

View source: R/adjust_graph.R

Description

Re-calculate PageRank with updated damping factor, personalized vector and edge weights.

Usage

1
adjust_graph(graph, damping = 0.85, personalized = NULL, weights = NULL)

Arguments

graph

(igraph) The graph to be adjusted.

damping

(numeric) Damping factor.

personalized

(numeric) Personalized vector.

weights

(numeric) Weight vector.

Value

(igraph) Network with 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, damping=0.85)$vector
adjust_graph(graph, damping=0.1)

hd2326/pageRank documentation built on Dec. 18, 2020, 8:44 a.m.