popgraph-operator-minus: Overload '-' operator for pairs of 'popgraph' objects

-.popgraphR Documentation

Overload '-' operator for pairs of popgraph objects

Description

An overload of the - operator for popgraph objects that removes the edges in the first one that are in the second one.

Usage

## S3 method for class 'popgraph'
e1 - e2

Arguments

e1

A popgraph object reprenting the offspring.

e2

A popgraph object representing the parent.

Value

A new popgraph object that represents the genotypes left over after removing the parental part (if possible).

Author(s)

Rodney J. Dyer rjdyer@vcu.edu

Examples

# library(igraph)
# e1 <- as.popgraph( igraph::graph.atlas(716) )
# e2 <- as.popgraph( igraph::graph.atlas(806) )
# e3 <- e1 - e2
# par(mfrow=c(1,3))
# l <- igraph::layout.fruchterman.reingold( e1 )
# plot(e1, layout=l)
# plot(e2, layout=l)
# plot(e3, layout=l)
# par(mfrow=c(1,1))

dyerlab/popgraph documentation built on July 22, 2022, 5:42 p.m.