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)

Arguments

.data

A data frame with columns rows, cols, and elts.

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.