Behaviour is a little different depending on the data format.
If the data frame is a 2 column edgelist,
the first column will become the rows
and the second column will become the columns.
If the data frame is a 3 column edgelist,
then the third column will be used as
the cell values or tie weights.
Incidence matrices are typically inferred from unequal dimensions,
but since in rare cases a matrix with equal dimensions may still
be an incidence matrix, an additional argument twomode
can be
specified to override this heuristic.
This information is usually already embedded in {igraph}
,
{tidygraph}
, and {network}
objects.