Learn R Programming

ergm.ego (version 1.1.0)

EgoStat-internal: Helper functions of EgoStats. Some may be documented and exported in the future.

Description

Helper functions of EgoStats. Some may be documented and exported in the future.

Usage

.attrErr(term, attrname, req = c("one", "both"))

.unfactor(x)

.degreeseq(egor)

.alterEgos(egor)

.exsum(x)

.extabulate(bin, nbins = max(1, bin, na.rm = TRUE))

.matchNA(x, table, nomatch = NA_integer_, incomparables = NULL)

.pasteNA(..., sep = " ", collapse = NULL)

.sapply_col(..., simplify = TRUE)

.mapply_col(..., SIMPLIFY = TRUE)

split_egos_by_ego(x, egor)

split_alters_by_ego(x, egor)

split_aaties_by_ego(x, egor)

.checkNA(x, ...)

Arguments

x, bin

a vector.

egor

an egor() object.

...

Additional arguments to subroutines.

Functions

  • .attrErr(): Construct and throw an error message about ego or alter attributes being missing.

  • .unfactor(): Convert a factor to its "ordinary" vector representation.

  • .degreeseq(): Degree sequence of the egos.

  • .alterEgos(): Ego index (i.e., row) associated with each alter.

  • .exsum(): As sum(), but "extrapolating" the NAs.

  • .extabulate(): As tabulate(), but "extrapolating" the NAs.

  • .matchNA(): As base::match(), but NAs are passed through.

  • .pasteNA(): As paste(), but NAs are passed through rather than typeset.

  • .sapply_col(): As sapply(), but if the function returns a vector, return those vectors in rows, and if it returns a scalar, return a column vector.

  • .mapply_col(): As mapply(), but if the function returns a vector, return those vectors in rows, and if it returns a scalar, return a column vector.

  • split_egos_by_ego(): Split an arbitrary vector or matrix by egos.

  • split_alters_by_ego(): Split an arbitrary vector or matrix by egos.

  • split_aaties_by_ego(): Split an arbitrary vector or matrix by egos.

  • .checkNA(): Pass through the input if it does not contain mising values; otherwise stop with given error. Arguments after the first are passed through to stop().