get_weights: Get edge weights

Description Usage Arguments Details Value

View source: R/get_weights.R

Description

A common interface

Usage

1
2
3
4
5
6
7
get_weights(x, ...)

## S3 method for class 'matrix'
get_weights(x, edges)

## S3 method for class 'igraph'
get_weights(g, edges)

Arguments

x

An adjacency matrix

edges

A matrix specifying edges as source->target ordered pairs.

g

An igraph object

Details

If an edge does not exist, the function will return a zero weight. The length of the output will always equal the number of edges provided as input.

Value

Real-valued edge weights.


crcox/latticize documentation built on Dec. 19, 2021, 6:19 p.m.