This function creates an ego network through interactive interview questions. It currently only supports a simplex, directed network of one or two modes. These directed networks can be reformatted as undirected using to_undirected(). Multiplex networks can be collected separately and then joined together afterwards.

The function supports the use of rosters or a maximum number of alters to collect. If a roster is provided it will offer ego all names. The function can also prompt ego to interpret each node's attributes, or about how ego considers their alters to be related.

create_ego(
  ego = NULL,
  max_alters = Inf,
  roster = NULL,
  interpreter = FALSE,
  interrelater = FALSE,
  twomode = FALSE
)

Arguments

ego

A character string. If desired, the name of ego can be declared as an argument. Otherwise the first prompt of the function will be to enter a name for ego.

max_alters

The maximum number of alters to collect. By default infinity, but many name generators will expect a maximum of e.g. 5 alters to be named.

roster

A vector of node names to offer as potential alters for ego.

interpreter

Logical. If TRUE, then it will ask for which attributes to collect and give prompts for each attribute for each node in the network. By default FALSE.

interrelater

Logical. If TRUE, then it will ask for the contacts from each of the alters perspectives too.

twomode

Logical. If TRUE, then it will assign ego to the first mode and all alters to a second mode.