A function to read edge list files with send, receive, and ties format for a multivariate network with the possibility to transform it into an three dimenasional array.
edgel(file, header = TRUE, sep = "\t", toarray = TRUE, dichot = FALSE,
attr = FALSE, rownames = FALSE, add = NULL)
By default an array; usually with three dimensions of stacked matrices where the multiple relations are placed.
If toarray = FALSE
, then the data frame is returned.
path to the file
(logical) does the file has a header?
the separator among the columns (default is horizontal tab escaped as "\t"
)
(logical) should the data frame be transformed to arrays?
(logical) should the data be dichotomized?
(logical) whether or not the file corresponds to attribute-based data
(logical) are rownames the labels of the nodes?
(optional) isolates to be added to the network
Antonio Rivero Ostoic
edgel
is a function to read edge list files with send, receive, and ties format,
which is a data frame with at least 2 columns for the sender, receiver and for multiplex networks also the ties, one column for each type of relation.
However, the attr
option correspond to a actor and self-ties data frame file with the option to transform it into a diagonal matrix.
When toarray
is set to FALSE
, options attr
and rownames
allow placing the first column of the data frame as the name of the table,
which is the format of two-mode data, and compute for instance Galois transformations among the partite sets.
If more than one isolate is added, then the data must be included as a vector.
It is also possible to treat the input data as data frame object and manipulate it through e.g. the subset
function with the toarray
option.
Valued networks are now supported as well.
write.edgel
, read.gml
, read.dl
, galois