View source: R/named_triplet.R
| create_triplet | R Documentation |
Creates a data frame triplet with columns
i_col, j_col, and value_col from matrix m.
Zero entries are not reported.
i and j integers are directly from m
and not referenced to any global set of i and j values.
create_triplet(
m,
retain_zero_structure = FALSE,
i_col = "i",
j_col = "j",
value_col = "value"
)
m |
A |
retain_zero_structure |
A boolean that tells whether
to retain the structure of zero matrices.
Default is |
i_col, j_col, value_col |
String names of i, j, and x columns. |
When m is a zero matrix,
a zero-row data frame is returned by default
(retain_zero_structure = FALSE).
But when retain_zero_structure is TRUE,
zero entries are reported for all rows and columns,
thereby preserving the structure of the matrix.
A tibble triplet representation of m.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.