vert.attr.multi: Get multiple variables from a data.frame and set them as...

Description Usage Arguments Value Uses

Description

This function repeatedly applies vert.attr() to a set of attributes. The problem that this function solves is that authors (nodes) in the graph and authors (records) in the data.frame data are not necessarily in the same sort order.

Usage

1
2
vert.attr.multi(data, graph, dataID, graphID = "name", attributes, FUN = NA,
  attr.names = attributes)

Arguments

data

The data.frame containing the vertex attribute variables to be imported in the graph (it must also include a authorID variable).

graph

The graph where to import the attribute.

dataID

Character. The ID variable for nodes in data. Must be the name of a variable in data. Will be used as a merge key with graphID.

graphID

Character. The vertex attribute that contains node IDs in graph. Must be the name of a vertex attribute in graph. Will be used as a merge key with dataID.

attributes

Character. Variable names in data.

FUN

Character. Function names given as character vector (the FUN argument to vert.attr()). If the vector is shorter than "attributes", it's recycled. Defaults to NA for all attributes.

attr.names

Character. Names to use for the attributes in the graph. Defaults to attributes.

Value

An igraph object.

Uses

vert.attr


tilltnet/egonetR documentation built on May 31, 2019, 1:46 p.m.