permute.vertexIDs: Permute (Relabel) the Vertices Within a Network

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

permute.vertexIDs permutes the vertices within a given network in the specified fashion. Since this occurs internally (at the level of vertex IDs), it is rarely of interest to end-users.

Usage

1

Arguments

x

an object of class network.

vids

a vector of vertex IDs, in the order to which they are to be permuted.

Details

permute.vertexIDs alters the internal ordering of vertices within a network. For most practical applications, this should not be necessary – de facto permutation can be accomplished by altering the appropriate vertex attributes. permute.vertexIDs is needed for certain other routines (such as delete.vertices), where it is used in various arcane and ineffable ways.

Value

Invisibly, a pointer to the permuted network. permute.vertexIDs modifies its argument in place.

Author(s)

Carter T. Butts buttsc@uci.edu

References

Butts, C. T. (2008). “network: a Package for Managing Relational Data in R.” Journal of Statistical Software, 24(2). http://www.jstatsoft.org/v24/i02/

See Also

network

Examples

1
2
3
4
5
data(flo)                     #Load the Florentine Families data
nflo<-network(flo)                      #Create a network object
n<-network.size(nflo)                #Get the number of vertices
permute.vertexIDs(nflo,n:1)                #Reverse the vertices
all(flo[n:1,n:1]==as.sociomatrix(nflo))          #Should be TRUE

network documentation built on May 2, 2019, 5:16 p.m.