Learn R Programming

ergm.ego (version 0.5)

[.egodata: Subsetting egodata Objects

Description

Returns subsets of egodata objects that meet conditions.

Usage

# S3 method for egodata
[(x, i, j, ..., dup.action = c("make.unique", "fail",
  "number"))

# S3 method for egodata subset(x, subset, select, ..., dup.action = c("make.unique", "fail", "number"))

Arguments

x

An egodata object.

Additional arguments, currently unused.

dup.action

What to do when an ego is referenced multiple times:

"make.unique"

Construct new unique ego IDs using the make.unique function

"fail"

Exit with an error.

"number"

Number the egos consecutively in the order they were selected

subset, i

An expression (evaluated in the context of the egos table of x producing a logical, integer, or character vector indicating which egos to select (and, for the latter two, how many times).

select, j

A numeric or character vector specifying the columns of egos and alters to select.

Value

An egodata object.

See Also

sample.egodata