Skip to contents

This function fills in an adjacency matrix based on actors and data

Usage

get_matrix(
  n_rows,
  n_cols,
  actors_rows,
  actors_cols,
  matRowIndices,
  matColIndices,
  value,
  symmetric,
  missing_to_zero = TRUE,
  diag_to_NA = TRUE
)

Arguments

n_rows

integer specifying number of row actors

n_cols

integer specifying number of column actors

actors_rows

character vector of row actors

actors_cols

character vector of column actors

matRowIndices

numeric vector indicating positions of senders in data

matColIndices

numeric vector indicating positions of receivers in data

value

numeric vector of values to fill in cross-sections of adjacency matrices

symmetric

logical indicating whether ties are symmetric

missing_to_zero

logical indicating whether missing values should be set to zero

diag_to_NA

logical indicating whether diagonal should be set to NA

Value

an adjacency matrix

Author

Shahryar Minhas, Ha Eun Choi