long.df.to.list: Trim/ listify ego-centric network data

Description Usage Arguments Value

Description

This function generates the alteri.list object. alteri.list is a list where each entry entails a dataframe of the alteri of one ego. By using the netsize variable it is ensured, that the list entries are of the correct length and possibly present rows of NA values are deleted.

Usage

1
long.df.to.list(long, netsize, egoID, back.to.df = F)

Arguments

long

A 'long' dataframe with alteri/dyads in rows.

netsize

Vector containing values of network size per ego.

egoID

Character. Name of the variable identifying egos (default: "egoID").

back.to.df

If TRUE a dataframe is returned, if FALSE a list. Defaults to FALSE.

wide

A data.frame of alteri attributes in the wide format.

Value

Returns a list of dataframes where every dataframe represents one ego/ network and the rows in the dataframe represents one alter. If the back.to.df parameter is called the list entries are combined to one dataframe, in the 'long' format.


tilltnet/egonetR documentation built on May 31, 2019, 1:46 p.m.