create_wdnet: Creates a 'wdnet' object from input data.

View source: R/cls_wdnet.R

create_wdnetR Documentation

Creates a wdnet object from input data.

Description

This function creates a wdnet object from edgelist and edgeweight or adj or returns the existing wdnet object. For internal usage.

Usage

create_wdnet(
  netwk,
  edgelist,
  edgeweight,
  nodegroup,
  directed,
  adj,
  weighted,
  ...
)

Arguments

netwk

A wdnet object. If NULL, the function will use the provided edgelist and edgeweight, or adj parameters to create a new wdnet object.

edgelist

A two-column matrix representing edges.

edgeweight

A vector representing the weights of the edges.

nodegroup

A numeric vector of node groups.

directed

A logical value indicating whether the network is directed. Required if netwk is NULL.

adj

An adjacency matrix.

weighted

A logical value indicating whether the network is weighted.

...

Additional components to be added to the wdnet list.

Value

A wdnet object.


wdnet documentation built on May 29, 2024, 9:32 a.m.