statnet.common4.13.0 package

Common R Scripts and Utilities Used by the Statnet Project Software

all_identical

Test if all items in a vector or a list are identical.

arr_from_coo

Conveniently covert between coordinate-value and array representations

as.control.list

Convert to a control list.

attr

A wrapper for base::attr which defaults to exact matching.

check.control.class

Ensure that the class of the control list is one of those that can be ...

compress_rows.data.frame

"Compress" a data frame.

compress_rows

A generic function to compress a row-weighted table

control.list.accessor

Named element accessor for ergm control lists

control.remap

Overwrite control parameters of one configuration with another.

default_options

Set options() according to a named list, skipping those already set.

deInf

Truncate values of high magnitude in a vector.

deprecation-utilities

Utilities to help with deprecating functions.

despace

A one-line function to strip whitespace from its argument.

diff.control.list

Identify and the differences between two control lists.

empty_env

Replace an object's environment with a simple, static environment.

enlist

Wrap an object into a singleton list if not already a list

envir

A generic for querying and setting an object's environment

ERRVL

Attempt a series of statements and return the first one that is not an...

fixed.pval

Format a p-value in fixed notation.

forkTimeout

Evaluate an expression with a hard time limit by forking a process

formula.utilities

Functions for Querying, Validating and Extracting from Formulas

handle.controls

Handle standard control.*() function semantics.

is.SPD

Test if the object is a matrix that is symmetric and positive definite

locate_function

Locate a function with a given name and return it and its environment.

logspace.utils

Utilities for performing calculations on logarithmic scale.

match_names

Construct a named vector with semantics useful for parameter vectors

mcmc-utilities

Utility operations for mcmc.list objects

message_print

print objects to the message output.

modify_in_place

Modify the argument in the calling environment of the calling function

NVL

Convenience functions for handling NULL objects.

once

Evaluate a function once for a given input.

opttest

Optionally test code depending on environment variable.

paste.and

Concatenates the elements of a vector (optionaly enclosing them in quo...

persistEval

Evaluate an expression, restarting on error

print.control.list

Pretty print the control list

replace

Replace values in a vector according to functions

set_diag

Return the matrix with diagonal set to a specified value

set.control.class

Set the class of the control list

sign-set

A generic for setting the sign of an object

simplify_simple

Convert a list to an atomic vector if it consists solely of atomic ele...

skip_if_not_checking

Skip a test if not called via R CMD check

snctrl-API

Helper functions used by packages to facilitate snctrl updating.

snctrl

Statnet Control

sort.data.frame

Implement the sort and order methods for data.frame and matrix...

split_len

Split a list or some other split()-able object by lengths

split.array

A split() method for array and matrix types on a margin.

ssolve

Wrappers around matrix algebra functions that pre-scale their argu...

statnet.cite

CITATION file utilities for Statnet packages (DEPRECATED)

statnetStartupMessage

Construct a "standard" startup message to be printed when the package ...

sweep_cols.matrix

Suptract a elements of a vector from respective columns of a matrix

term_list

A helper class for list of terms in an formula

trim_env

Make a copy of an environment with just the selected objects.

ult

Extract or replace the ultimate (last) element of a vector or a li...

unused_dots_warning

An error handler for rlang::check_dots_used() that issues a warning ...

unwhich

Construct a logical vector with TRUE in specified positions.

vector.namesmatch

reorder vector v into order determined by matching the names of its el...

Welford

A Welford accumulator for sample mean and variance

which_top_n

Top or bottom n elements of a vector

wmatrix_weights

Set or extract weighted matrix row weights

wmatrix

A data matrix with row weights

xTAx

Common quadratic forms

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

  • Maintainer: Pavel N. Krivitsky
  • License: GPL-3 + file LICENSE
  • Last published: 2025-12-16