Common R Scripts and Utilities Used by the Statnet Project Software

Non-statistical utilities used by the software developed by the Statnet Project. They may also be of use to others.

Build Status Build Status rstudio mirror downloads cran version Coverage status

Non-statistical utilities used by the software developed by the Statnet Project. They may also be of use to others.


statnet.common 4.2.0

New utilities

  • .Deprecate_once() calls .Deprecated(), passing all its arguments through, but only the first time it's called.

  • .Deprecate_method() calls .Deprecated(), but only if a method has been called by name, i.e., \code{\var{METHOD}.\var{CLASS}}.

  • forkTimeout() evaluates an \R expression with a hard time limit (except on Windows) by forking a process. Unlike setTimeLimit(), it enforces the limit even on native code.

  • ult() is a convenience function that extracts or replaces elements of a list indexed from the end.


  • statnet.common now depends on \R >= 3.5 due to what appears to be a method dispatching bug in earlier versions.

  • The package no longer Enhances coda.

statnet.common 4.1.4

New utilities

  • despace() removes whitespace from a string.

  • Pseudo-methods colMeans.mcmc.list(), sweep.mcmc.list(), and lapply.mcmc.list() (migrated from the ergm package).

  • filter_rhs.formula() selectively deletes terms in on the RHS of a formula.

  • eval_lhs.formula() extracts the LHS of the formula and evaluates it in the specified environment.

  • NVL2() and NVL3() for flexible substitution of null values.

  • message_print() formats its arguments as if for print() or show() methods, but then prints to stderr like message().

Enhancements to existing utilities

  • paste.and() now takes an additional con= argument, allowing a conjunction other than "and" to be used.

  • ERRVL() now uses lazy evaluation and lets the user dot-substitute the previous argument's try-error into the next argument.

Bug fixes

  • Printing for control lists now works for function arguments.

  • A number of improvements to rle methods.


  • A number of functions have been renamed for consistency:

    • term.list.formula()list_rhs.formula()
    • append.rhs.formula()append_rhs.formula()
    • nonsimp.update.formula()nonsimp_update.formula()
  • Citation utilities have been deprecated, since CRAN's structure makes them unusable.

statnet.common 4.0.0

  • The package now uses Roxygen for documentation.

  • term.list.formula() output format has been changed, since support of attributes on symbols is being deprecated.

  • A library of methods has been added for the base rle class, implementing concatenation, compaction, and a number of binary operations.

  • all_same() has been moved from ergm and renamed to all_identical().

  • A new assignment method NVL()<- overwrites a variable if its value is NULL.

  • A set of classes and functions for manipulating and efficiently performing calculations on dense matrices or vectors with weighted rows or elements (possibly on the log scale) has been added.

  • New control parameter helper function, control.remap() has been added. Autodetection of function names by set.control.class() and check.control.class() has been deprecated and now results in a warning.

  • Improvements to the compressed data frame code, including an order() generic.

  • Miscellaneous robustifications added.

  • Native routine registration has been added.

statnet.common 3.3.0

  • append.rhs.formula(), vectors.namesmatch(), term.list.formula(), and ergm.update.formula() (renamed to nosimp.update.formula()) moved from ergm.

  • Skye Bender-deMoll has been added as a contributor.

statnet.common 3.2.3

  • ERRVL() moved from ergm.

  • Some NAMESPACE and other fixes to pass CRAN checks.

statnet.common 3.2.2

  • control class improvements and bug fixes.

statnet.common 3.1.1

  • Updated e-mail address

  • Some improvements to opttest.

statnet.common 3.1.0

  • Initial release, incorporating the control class framework (set.control.class(), check.control.class(), print.control.list()); startup message framework; NVL();;; paste.and(); citation utilities framework; and opttest() framework.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


4.4.1 by Pavel N. Krivitsky, a month ago

Report a bug at

Browse source code at

Authors: Pavel N. Krivitsky [aut, cre] , Skye Bender-deMoll [ctb]

Documentation:   PDF Manual  

GPL-3 + file LICENSE license

Imports utils, methods, coda, parallel, tools, rle

Suggests covr

Imported by BasketballAnalyzeR, Blaunet, RDS, btergm, ergm, ergm.count, ergm.ego, ergm.rank, ergm.userterms, latentnet, ndtv, networkDynamic, statnet, tergm, tergmLite, tsna.

Depended on by sna.

Suggested by network, pkggraph.

See at CRAN