Skip to contents

Print method for barry_graph objects.

Usage

# S3 method for class 'barry_graph'
print(x, n = min(10, netsize(x)), ...)

Arguments

x

A barry_graph object.

n

Integer. Number of nodes to display (default: min of 10 and the network size).

...

Additional arguments passed to print (currently ignored).

Value

Invisibly returns the input object. Called for its side effect of printing.

Examples

data(krackhardt_advice)
data(krackhardt_advice_perceptions)

n_people <- 21
advice_matrix <- matrix(0L, nrow = n_people, ncol = n_people)
advice_matrix[cbind(krackhardt_advice$from, krackhardt_advice$to)] <-
  krackhardt_advice$value

krack_graph <- new_barry_graph(
  c(list(advice_matrix), krackhardt_advice_perceptions)
)
print(krack_graph)
#> A barry_graph with 22 networks of size 21
#> .    .  1.00     .  1.00     .     .     .  1.00     .     . 
#>     .     .     .     .     .  1.00  1.00     .     .     . 
#>  1.00  1.00     .  1.00     .  1.00  1.00  1.00  1.00  1.00 
#>  1.00  1.00     .     .     .  1.00     .  1.00     .  1.00 
#>  1.00  1.00     .     .     .  1.00  1.00  1.00     .  1.00 
#>     .     .     .     .     .     .     .     .     .     . 
#>     .  1.00     .     .     .  1.00     .     .     .     . 
#>     .  1.00     .  1.00     .  1.00  1.00     .     .  1.00 
#>  1.00  1.00     .     .     .  1.00  1.00  1.00     .  1.00 
#>  1.00  1.00  1.00  1.00  1.00     .     .  1.00     .     . 
#> Skipping 452 rows. Skipping 452 columns.