Skip to contents

This function organizes netlet data by integrating x and y positions from nodes_list and connection data from edges_list into the node and edge data structures returned by decompose_netlet. It supports both cross-sectional and longitudinal data formats.

Usage

merge_layout_attribs(netlet, nodes_list, edges_list)

Arguments

netlet

A netify object containing the network data.

nodes_list

A list of data frames (or a single data frame for cross-sectional data) containing node positions with columns actor, x, and y. For longitudinal data, each list element corresponds to a different time slice.

edges_list

A list of data frames (or a single data frame for cross-sectional data) detailing the connections between nodes. Each data frame should include at least the columns from, to, and for longitudinal data, time.

Value

A list containing two data frames: nodal_data and edge_data. Each data frame incorporates the corresponding node or edge data along with their spatial coordinates (and time indices for longitudinal data).