Learn R Programming

multiplex (version 4.0)

as.signed: Coerce into a Signed Object

Description

A generic function for coercing a matrix into a “Signed” class object.

Usage

as.signed(x, lbs)

Value

The input array in x as a “Signed” class.

Arguments

x

A matrix representing the signed network.

lbs

(optional) Labels for the signed matrix.

Details

Use this function to convert an array representing a signed network into an R object of class “Signed”, as required by function semiring.

The array in x itself can be also a “Semiring” class object represented as ‘Rel.Q’ attribute for the semiring relational structure.

See Also

signed, semiring

Examples

Run this code
# load a network dataset
data("incubA")

# coerce parts of the signed matrix with two types of relations
signed(incubA$IM)$s[1:2,1:2] |> 
  as.signed()

Run the code above in your browser using DataLab