groupData | R Documentation |
Takes a matrix x
and groups its rows (or columns)
as specified by indices
. Returns a list of matrices, one for each group.
groupData(x, indices, byrow = FALSE)
x |
A |
indices |
list of vectors of indices according to
which |
byrow |
|
A list
of matrices (one per group).
Such a list, grouped by columns, is then typically passed on to zenplot()
.
Marius Hofert and Wayne Oldford
zenplot()
which provides the zenplot.
Other tools related to constructing zenpaths:
connect_pairs()
,
extract_pairs()
,
graph_pairs()
,
indexData()
,
zenpath()
## get a matrix
x <- matrix(1:15, ncol = 3)
colGroups <- list(c(1,2), list(2:3))
rowGroups <- list(c(1,4), list(2:3))
groupData(x, indices = colGroups)
groupData(x, indices = rowGroups, byrow = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.