A function to transform a wide-format dataframe of ego-centered network data into a long-format data-frame, where every row represents one alter/dyad. In the created dataframe numerous networks can be distinguished by a network ID (egoID).
wide.to.long(
wide,
egoID = "egoID",
max.alters,
start.col,
end.col,
var.wise = FALSE
)
A data.frame
of alter attributes in the wide format.
Character
. Name of the variable identifying egos (default: "egoID").
A numeric
giving the maximum number of alters.
Index or name of the first column containing alter-alter relation data.
#!# Should: Defaults to first column of wide
.
Index or name of the first column containing alter-alter relation data.
#!# Should: Defaults to last column of wide
.
a logical value indicating whether the alter attributes are stored variable-wise, if FALSE alter-wise storage is assumed.