Note: Setting fill
will replace NAs and NaNs, along with elements
corresponding to missing rows, with the value of fill
.
build_matrix(.data, rows, cols, elts, fill = NULL)
.data | A data frame with columns |
---|---|
rows | Column that will become the rownames of the matrix. |
cols | Column that will become the colnames of the matrix. |
elts | Column that will become the matrix elements. |
fill | Value to use for missing elements. |