extract_pairs | R Documentation |
Extracts pairs from a path of indices, representing the path by the pairs (connected by common variable) and return a shortened path.
extract_pairs(x, n)
x |
the path, a |
n |
A |
returns an object of the same type as the input
x
but (possibly) shortened. It extracts the first/last so-many
pairs of x
.
Marius Hofert and Wayne Oldford
zenplot()
which provides the zenplot.
Other tools related to constructing zenpaths:
connect_pairs()
,
graph_pairs()
,
groupData()
,
indexData()
,
zenpath()
## Begin with a path
(zp <- zenpath(c(3, 5), method = "eulerian.cross")) # integer(2) argument
## Extract the first two pairs and last four of indices
extract_pairs(zp, n = c(2, 4))
## Extract the first and last three pairs of indices
extract_pairs(zp, n = 3) # the 3 is repeated automatically
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.