df2mat {ggbrain} | R Documentation |
Convert a 3-column data.frame (dim1, dim2, value) to a 2-D matrix
Description
Convert a 3-column data.frame (dim1, dim2, value) to a 2-D matrix
Arguments
df |
A |
replace_na |
if not |
Details
There is virtually no input validation of df
. You must pass a data.frame that has dim1, dim2, and value as
columns. Otherwise, it will not work as expected.
This is a much faster version of the acast function from reshape2
that works only on 2-D matrix conversions.
Value
The matrix form of the keyed data.frame object
[Package ggbrain version 0.9.0 Index]