R: Coerce a Network Object to a 'data.frame'

as.data.frame.network {network} | R Documentation

## Coerce a Network Object to a `data.frame`

### Description

The `as.data.frame` method coerces its input to a `data.frame` containing `x`'s edges or vertices.

### Usage

    ## S3 method for class 'network'
    as.data.frame(
      x,
      ...,
      unit = c("edges", "vertices"),
      na.rm = TRUE,
      attrs_to_ignore = "na"
    )

### Arguments

`x` | an object of class `network`
`...` | additional arguments
`unit` | whether a `data.frame` of edge or vertex attributes should be returned.
`na.rm` | logical; ignore missing entries when constructing the data frame?
`attrs_to_ignore` | character; a vector of attribute names to exclude from the returned `data.frame` (Default: `"na"`)

[Package network version 1.17.2 Index]