Print the graph object

# S3 method for class 'igraph'
print(x, ...)

# S3 method for class 'network'
print(x, na.omit = FALSE, ...)

Arguments

x

graph object of class network or igraph

...

Additional agruments.

na.omit

logical; omit summarization of missing attributes in a network object?

Value

nothing, the object is merely printed

Details

Prints a graph object of class network or igraph exactly as it would be printed by the network or igraph packages, respectively. The function wraps print.network and print.igraph. Whatever is set in ... is passed onto these original functions. See the respective help pages if you want to use settings that deviate from the default settings in these packages.

This function prints the objects just as they would be printed if the packages were attached, but now they do not need to be attached.

Examples

g_i <- snafun::create_random_graph(10, "gnm", m = 20, graph = "igraph")
g_n <- snafun::create_random_graph(10, "gnm", m = 20, graph = "network")
print(g_i)
#> IGRAPH defba9e D--- 10 20 -- Erdos-Renyi (gnm) graph
#> + attr: name (g/c), type (g/c), loops (g/l), m (g/n)
#> + edges from defba9e:
#>  [1]  1-> 8  2-> 3  2-> 8  3-> 5  3-> 7  4-> 1  4-> 2  4-> 7  5-> 6  6-> 1
#> [11]  6-> 3  6-> 7  7-> 2  7-> 3  8-> 2  8-> 6  9-> 1  9-> 7  9->10 10-> 1
print(g_n)
#>  Network attributes:
#>   vertices = 10 
#>   directed = TRUE 
#>   hyper = FALSE 
#>   loops = FALSE 
#>   multiple = FALSE 
#>   bipartite = FALSE 
#>   total edges= 20 
#>     missing edges= 0 
#>     non-missing edges= 20 
#> 
#>  Vertex attribute names: 
#>     vertex.names 
#> 
#> No edge attributes