Network: Creates objects of calss 'Network'

View source: R/gr_Network.R

NetworkR Documentation

Creates objects of calss Network

Description

Creates objects of calss Network

Usage

Network(x, data)

Arguments

x

The graph with named nodes, an object of class igraph

data

Data set, with named columns

Value

An object containing the graph and the data whose columns are associated to the nodes.

Examples

g<- graph(c(1,2,2,3), directed=FALSE)
g<- set.vertex.attribute(g, "name", V(g), c("a", "b" ,"c")) # name the nodes
data<- matrix(rnorm(10*3), 10,3)
colnames(data)<- c("a", "b", "c")  # name the columns
net<- Network(x = g, data = data)

gremes documentation built on Feb. 16, 2023, 8:06 p.m.