nameRows {dst} | R Documentation |
Combining the column names of a matrix to construct names for the rows
Description
This function determines the name of a row from all the columns of the tt
that show 1 for that row.
Usage
nameRows(tt, f)
Arguments
tt |
A (0,1)-matrix or a boolean matrix. |
f |
Deprecated. Old name for |
Details
The row containing only 1s is called "frame", to avoid too long a label. The empty set is identified by its code "u00f8". The "+" sign is used to represent the logical "or" operator. The space " " is used to represent the logical "and" operator. Note that in the case of a product space defined on many variables, row labels can become very long.
Value
A character vector of labels obtained for the rows of the tt
matrix. The length of the result is nrow(tt)
.
Author(s)
Claude Boivin
Examples
tt <- matrix(c(0,0,0,1,0,0,0,0,1,1,0,1,1,1,1),ncol = 3, byrow = TRUE)
colnames(tt) <- c("A","B","C")
rownames(tt) <-nameRows(tt)
tt
[Package dst version 1.7.0 Index]