Learn R Programming

networkLite (version 1.1.0)

as.edgelist.networkLite: Convert a networkLite to a Matrix or tibble.

Description

Convert a networkLite to a Matrix or tibble.

Usage

# S3 method for networkLite
as.edgelist(
  x,
  attrname = NULL,
  output = c("matrix", "tibble"),
  na.rm = TRUE,
  ...
)

# S3 method for networkLite as_tibble( x, attrnames = (match.arg(unit) == "vertices"), na.rm = TRUE, ..., unit = c("edges", "vertices") )

# S3 method for networkLite as.matrix( x, matrix.type = c("adjacency", "incidence", "edgelist"), attrname = NULL, ... )

Value

A matrix or tibble (possibly of class edgelist) constructed from the networkLite.

Arguments

x

A networkLite.

attrname

Name of an edge attribute in x.

output

Type of edgelist to output.

na.rm

should missing edges be dropped from edgelist?

...

additional arguments

attrnames

Vector specifying edge attributes to include in the tibble; may be logical, integer, or character vector, the former two being used to select attribute names from list.edge.attributes(x), and the latter being used as the attribute names themselves

unit

whether to return attributes for edges or for vertices

matrix.type

type of matrix to return from as.matrix.networkLite