Learn R Programming

statnet.common (version 4.10.0)

Common R Scripts and Utilities Used by the Statnet Project Software

Description

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

Copy Link

Version

Install

install.packages('statnet.common')

Monthly Downloads

29,838

Version

4.10.0

License

GPL-3 + file LICENSE

Last Published

October 6th, 2024

Functions in statnet.common (4.10.0)

once

Evaluate a function once for a given input.
locate_function

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

Utilities for performing calculations on logarithmic scale.
simplify_simple

Convert a list to an atomic vector if it consists solely of atomic elements of length 1.
snctrl_names

Helper functions used by packages to facilitate snctrl updating.
print.control.list

Pretty print the control list
set.control.class

Set the class of the control list
handle.controls

Handle standard control.*() function semantics.
opttest

Optionally test code depending on environment variable.
split.array

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

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

Wrappers around matrix algebra functions that pre-scale their arguments
message_print

print objects to the message output.
mcmc-utilities

Utility operations for mcmc.list objects
wmatrix

A data matrix with row weights
vector.namesmatch

reorder vector v into order determined by matching the names of its elements to a vector of names
order

Implement the sort and order methods for data.frame and matrix, sorting it in lexicographic order.
xTAx

Common quadratic forms
wmatrix_weights

Set or extract weighted matrix row weights
snctrl

Statnet Control
unused_dots_warning

An error handler for rlang::check_dots_used() that issues a warning that only lists argument names.
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 list, or an element counting from the end.
unwhich

Construct a logical vector with TRUE in specified positions.
diff.control.list

Identify and the differences between two control lists.
paste.and

Concatenates the elements of a vector (optionaly enclosing them in quotation marks or parentheses) adding appropriate punctuation and conjunctions.
persistEval

Evaluate an expression, restarting on error
statnet.cite

CITATION file utilities for Statnet packages (DEPRECATED)
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
statnetStartupMessage

Construct a "standard" startup message to be printed when the package is loaded.
check.control.class

Ensure that the class of the control list is one of those that can be used by the calling function
compress_rows

A generic function to compress a row-weighted table
as.control.list

Convert to a control list.
attr

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

A Welford accumulator for sample mean and variance
all_identical

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

Named element accessor for ergm control lists
formula.utilities

Functions for Querying, Validating and Extracting from Formulas
despace

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

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

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

Utilities to help with deprecating functions.
empty_env

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

ERRVL

compress_rows.data.frame

"Compress" a data frame.
fixed.pval

Format a p-value in fixed notation.
control.remap

Overwrite control parameters of one configuration with another.
deInf

Truncate values of high magnitude in a vector.