Skip to contents

This function allows to get a graph object from a certain webpage.

Usage

graph_from_webpage(target)

Arguments

target

The target file you are targeting (Usually a web adress).

Value

Returns an igraph graph object based on the direct connections of the targeted webpage.

Examples


target = "https://en.wikipedia.org/wiki/R_(programming_language)"

g <- graph_from_webpage(target)
#> Time for edgelist_of https://en.wikipedia.org/wiki/R_(programming_language): 0.259785652160645 seconds.
#> Time for graph_from_webpage : 0.262419939041138seconds.

plot(g,
    layout = igraph::layout_with_fr,
    vertex.size=4,
    vertex.label=NA,
    vertex.label.dist=0.5,
    vertex.color="red",
    edge.arrow.size=0.5)