as.character.grapherator: Graph string representation.

Description Usage Arguments Value Examples

View source: R/as.character.R

Description

Given a grapherator object the function returns a string representation. Basically this is a concatenation of meta data, node, edge and weight generator types of the following format: N<n.nodes>-E<n.edges>-C<n.clusters>-W<n.weights>—<node-types>—<edge-types>—<weight-types> where n.x is the number of x of the graph.

Usage

1
2
## S3 method for class 'grapherator'
as.character(x, ...)

Arguments

x

[grapherator]
Graph.

...

[any]
Not used at the moment.

Value

[character(1)]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
g = graph(lower = c(0, 0), upper = c(100, 100))
g = addNodes(g, n = 3, generator = addNodesUniform)
g = addNodes(g, n = 14, by.centers = TRUE, generator = addNodesUniform,
  lower = c(0, 0), upper = c(10, 10))
g = addEdges(g, generator = addEdgesWaxman, alpha = 0.2,
  beta = 0.2, type = "intracluster")
g = addEdges(g, generator = addEdgesDelauney, type = "intercenter")
g = addWeights(g, generator = addWeightsCorrelated, rho = -0.9)
g = addWeights(g, generator = addWeightsDistance, method = "euclidean")
as.character(g)

jakobbossek/grapherator documentation built on Oct. 4, 2021, 11:03 a.m.