Learn R Programming

geomnet (version 0.3.1)

fortify.igraph: Function for converting an igraph object into the correct format for use with geomnet

Description

Function for converting an igraph object into the correct format for use with geomnet

Usage

# S3 method for igraph
fortify(model, data = NULL, group = NULL, ...)

Arguments

model

A network object of class "igraph".

data

NULL - not used in this function

group

character. Used for facetting. If you wish to facet on a network variable provide the name of that variable here.

...

not used in this function

Examples

Run this code
# NOT RUN {
# class igraph (igraph, igraphdata packages)
library(igraph)
data(blood, package = "geomnet")
blood.igraph <- graph_from_data_frame(d = blood$edges, 
   directed = TRUE, vertices = unique(blood$vertices[, 1:3]))
fortify(blood.igraph)

# }

Run the code above in your browser using DataLab