-
Notifications
You must be signed in to change notification settings - Fork 4
egor format specification
The purpose of this page is to have and discuss the current detailed specification for egor
's internal representation.
Note that this table does not update automatically. Rather, you need to go to https://tableofcontents.herokuapp.com/, paste the contents of the page after the table into it, then replace the table with the output. (You might also need to delete the first four spaces on each line.)
An egor
object is a subclass of tibble
(tbl_df
, to be precise) with certain special-purpose columns and additional attributes.
attr(egor, "ego.design")
(required) is a survey.design
or similar object containing information about how the egos were selected.
attr(egor, "alter.design")
(required) is a list
containing information about how the data about alters were collected. Currently, this includes:
-
max
(required): Maximum number of alters an ego was allowed to nominate. Set to+Inf
if no limit.
egor$.alts
(required) column contains a (possibly 0-row) tibble
for each row in the egor
object. These tibble
s must have identical column number and names, and contain information about nominations.
egor$.aaties
(optional) column contains a (possibly 0-row) tibble
for each row in the egor
object. These tibble
s must have identical column number and names, and contain information about alter-alter nominations.
egor$.alts[[1]]$.altID
(optional) column contains unique identifiers (numeric
or character
) of the nominations. This column is required if egor$.aaties
is present.
egor$.aaties[[1]]$.srcID
(required) column contains the alter identifier (that can be matched against egor$.alts[[1]]$.altID
) of the tail of the alter-alter relation.
egor$.aaties[[1]]$.tgtID
(required) column contains the alter identifier (that can be matched against egor$.alts[[1]]$.altID
) of the head of the alter-alter relation.
In general, the end-user should not have persistent data columns whose names begin with a dot (.
). This will help ensure that data columns will not accidentally mask variables when using non-standard evaluation like subset.egor()
does. When using placeholder or ephemeral variables, the user should also be aware that the following have been reserved for egor
's use:
- Top-level:
.alts
,.aaties
,.egoRow
- Second-level:
.alts$.altID
,.alts$.altRow
,.aaties$.srcID
,.aaties$.tgtID
,.aaties$.srcRow
,.aaties$.tgtRow