as.edgelist.networkLite {networkLite}R Documentation

Convert a networkLite to a Matrix or tibble.

Description

Convert a networkLite to a Matrix or tibble.

Usage

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

## S3 method for class 'networkLite'
as_tibble(x, attrnames = NULL, na.rm = TRUE, ...)

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

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

matrix.type

type of matrix to return from as.matrix.networkLite

Value

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


[Package networkLite version 1.0.5 Index]