plot.edges: Plot

Description Usage Arguments Value Examples

View source: R/edges.R

Description

plots an edges objects

Usage

1
2
3
4
5
## S3 method for class 'edges'
plot(x, Blocks, sorted = TRUE, xlab = "Node", ylab = "Node", ...)

## S3 method for class 'edges'
image(x, Blocks, sorted = TRUE, xlab = "Node", ylab = "Node", ...)

Arguments

x

an edges object

Blocks

a blocks object or sbm object

sorted

sort by block membership in sbm before plotting?

xlab

label for x-axis

ylab

label for y-axis

...

parameters for image

Value

ggplot2 plot of edges in a raster

Examples

1
2
3
4
5
6
7
## make an sbm model, sample data then plot and print:
model <- sbmmod(dma(2,5), param_beta(1,1,1,1), edges_bern())
s <- model$r(100)
e <- redges(s, model$edge)
plot(e)
plot(e, s)
print(e)

SBMSplitMerge documentation built on July 1, 2020, 5:23 p.m.