R: Common R Scripts and Utilities Used by the Statnet Project Software

# Common R Scripts and Utilities Used by the Statnet Project Software

## Documentation for package ‘statnet.common’ version 4.13.0

- DESCRIPTION file
- Package NEWS

## Help Pages

A B C D E F G H I L M N O P Q R S T U V W X misc

## -- A --

all_identical | Test if all items in a vector or a list are identical.
append.rhs.formula | Functions for Querying, Validating and Extracting from Formulas
append_rhs.formula | Functions for Querying, Validating and Extracting from Formulas
arr_from_coo | Conveniently covert between coordinate-value and array representations
arr_to_coo | Conveniently covert between coordinate-value and array representations
as.control.list | Convert to a control list.
as.control.list.control.list | Convert to a control list.
as.control.list.list | Convert to a control list.
as.linwmatrix | A data matrix with row weights
as.linwmatrix.linwmatrix | A data matrix with row weights
as.linwmatrix.logwmatrix | A data matrix with row weights
as.linwmatrix.matrix | A data matrix with row weights
as.logwmatrix | A data matrix with row weights
as.logwmatrix.linwmatrix | A data matrix with row weights
as.logwmatrix.logwmatrix | A data matrix with row weights
as.logwmatrix.matrix | A data matrix with row weights
as.term_list | A helper class for list of terms in an formula
as.term_list.default | A helper class for list of terms in an formula
as.term_list.term_list | A helper class for list of terms in an formula
attr | A wrapper for base::attr which defaults to exact matching.

## -- B --

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

## -- C --

c.term_list | A helper class for list of terms in an formula
check.control.class | Ensure that the class of the control list is one of those that can be used by the calling function
COLLATE_ALL_MY_CONTROLS_EXPR | Helper functions used by packages to facilitate 'snctrl' updating.
collate_controls | Helper functions used by packages to facilitate 'snctrl' updating.
colMeans.mcmc.list | Utility operations for 'mcmc.list' objects
compress_rows | A generic function to compress a row-weighted table
compress_rows.data.frame | "Compress" a data frame.
compress_rows.linwmatrix | A data matrix with row weights
compress_rows.logwmatrix | A data matrix with row weights
control.list.accessor | Named element accessor for ergm control lists
control.remap | Overwrite control parameters of one configuration with another.

## -- D --

decompress_rows | A generic function to compress a row-weighted table
decompress_rows.compressed_rows_df | "Compress" a data frame.
decompress_rows.wmatrix | A data matrix with row weights
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.

## -- E --

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
envir.term_list | A helper class for list of terms in an formula
envir<- | A generic for querying and setting an object's environment
envir<-.term_list | A helper class for list of terms in an formula
ERRVL | Attempt a series of statements and return the first one that is not an error.
ERRVL2 | Attempt a series of statements and return the first one that is not an error.
ERRVL3 | Attempt a series of statements and return the first one that is not an error.
eval_lhs.formula | Functions for Querying, Validating and Extracting from Formulas
EVL | Convenience functions for handling 'NULL' objects.
EVL2 | Convenience functions for handling 'NULL' objects.
EVL3 | Convenience functions for handling 'NULL' objects.
EVL<- | Convenience functions for handling 'NULL' objects.

## -- F --

filter_rhs.formula | Functions for Querying, Validating and Extracting from Formulas
fixed.pval | Format a p-value in fixed notation.
forkTimeout | Evaluate an R expression with a hard time limit by forking a process
formula.utilities | Functions for Querying, Validating and Extracting from Formulas

## -- G --

ginv_eigen | Wrappers around matrix algebra functions that pre-_s_cale their arguments

## -- H --

handle.controls | Handle standard control.*() function semantics.

## -- I --

is.linwmatrix | A data matrix with row weights
is.logwmatrix | A data matrix with row weights
is.SPD | Test if the object is a matrix that is symmetric and positive definite
is.wmatrix | A data matrix with row weights

## -- L --

lapply.mcmc.list | Utility operations for 'mcmc.list' objects
linwmatrix | A data matrix with row weights
list_rhs.formula | Functions for Querying, Validating and Extracting from Formulas
list_summands.call | Functions for Querying, Validating and Extracting from Formulas
locate_function | Locate a function with a given name and return it and its environment.
locate_prefixed_function | Locate a function with a given name and return it and its environment.
log1mexp | Utilities for performing calculations on logarithmic scale.
logspace.utils | Utilities for performing calculations on logarithmic scale.
logwmatrix | A data matrix with row weights
log_mean_exp | Utilities for performing calculations on logarithmic scale.
log_sum_exp | Utilities for performing calculations on logarithmic scale.
lrowweights | Set or extract weighted matrix row weights
lrowweights.linwmatrix | Set or extract weighted matrix row weights
lrowweights.logwmatrix | Set or extract weighted matrix row weights
lrowweights<- | Set or extract weighted matrix row weights
lrowweights<-.linwmatrix | Set or extract weighted matrix row weights
lrowweights<-.logwmatrix | Set or extract weighted matrix row weights
lrowweights<-.matrix | Set or extract weighted matrix row weights
lweighted.cov | Utilities for performing calculations on logarithmic scale.
lweighted.mean | Utilities for performing calculations on logarithmic scale.
lweighted.var | Utilities for performing calculations on logarithmic scale.

## -- M --

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

## -- N --

nonsimp.update.formula | Functions for Querying, Validating and Extracting from Formulas
nonsimp_update.formula | Functions for Querying, Validating and Extracting from Formulas
NVL | Convenience functions for handling 'NULL' objects.
NVL2 | Convenience functions for handling 'NULL' objects.
NVL3 | Convenience functions for handling 'NULL' objects.
NVL<- | Convenience functions for handling 'NULL' objects.

## -- O --

once | Evaluate a function once for a given input.
opttest | Optionally test code depending on environment variable.
order | Implement the 'sort' and 'order' methods for 'data.frame' and 'matrix', sorting it in lexicographic order.
order.data.frame | Implement the 'sort' and 'order' methods for 'data.frame' and 'matrix', sorting it in lexicographic order.
order.default | Implement the 'sort' and 'order' methods for 'data.frame' and 'matrix', sorting it in lexicographic order.
order.matrix | Implement the 'sort' and 'order' methods for 'data.frame' and 'matrix', sorting it in lexicographic order.

## -- P --

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
persistEvalQ | Evaluate an expression, restarting on error
print.control.list | Pretty print the control list
print.diff.control.list | Identify and the differences between two control lists.
print.linwmatrix | A data matrix with row weights
print.logwmatrix | A data matrix with row weights
print.term_list | A helper class for list of terms in an formula
print.wmatrix | A data matrix with row weights

## -- Q --

qrsolve | Wrappers around matrix algebra functions that pre-_s_cale their arguments
qrssolve | Wrappers around matrix algebra functions that pre-_s_cale their arguments

## -- R --

replace | Replace values in a vector according to functions
replace<- | Replace values in a vector according to functions
rowweights | Set or extract weighted matrix row weights
rowweights.linwmatrix | Set or extract weighted matrix row weights
rowweights.logwmatrix | Set or extract weighted matrix row weights
rowweights<- | Set or extract weighted matrix row weights
rowweights<-.linwmatrix | Set or extract weighted matrix row weights
rowweights<-.logwmatrix | Set or extract weighted matrix row weights
rowweights<-.matrix | Set or extract weighted matrix row weights

## -- S --

sandwich_ginv | Common quadratic forms
sandwich_qrsolve | Wrappers around matrix algebra functions that pre-_s_cale their arguments
sandwich_qrssolve | Wrappers around matrix algebra functions that pre-_s_cale their arguments
sandwich_sginv | Common quadratic forms
sandwich_solve | Common quadratic forms
sandwich_ssolve | Wrappers around matrix algebra functions that pre-_s_cale their arguments
set.control.class | Set the class of the control list
set_diag | Return the matrix with diagonal set to a specified value
sginv | Wrappers around matrix algebra functions that pre-_s_cale their arguments
sign.term_list | A helper class for list of terms in an formula
sign<- | A generic for setting the sign of an object
sign<-.term_list | A helper class for list of terms in an formula
simplify_simple | Convert a list to an atomic vector if it consists solely of atomic elements of length 1.
skip_if_not_checking | Skip a test if not called via R CMD 'check'
snctrl | Statnet Control
snctrl-API | Helper functions used by packages to facilitate 'snctrl' updating.
snctrl_names | Helper functions used by packages to facilitate 'snctrl' updating.
snearPD | Wrappers around matrix algebra functions that pre-_s_cale their arguments
sort.data.frame | Implement the 'sort' and 'order' methods for 'data.frame' and 'matrix', sorting it in lexicographic order.
split.array | A 'split()' method for 'array' and 'matrix' types on a margin.
split.matrix | A 'split()' method for 'array' and 'matrix' types on a margin.
split_len | Split a list or some other 'split()'-able object by lengths
srcond | Wrappers around matrix algebra functions that pre-_s_cale their arguments
ssolve | Wrappers around matrix algebra functions that pre-_s_cale their arguments
statnet.cite | 'CITATION' file utilities for Statnet packages (DEPRECATED)
statnet.cite.foot | 'CITATION' file utilities for Statnet packages (DEPRECATED)
statnet.cite.head | 'CITATION' file utilities for Statnet packages (DEPRECATED)
statnet.cite.pkg | 'CITATION' file utilities for Statnet packages (DEPRECATED)
statnetStartupMessage | Construct a "standard" startup message to be printed when the package is loaded.
sweep.mcmc.list | Utility operations for 'mcmc.list' objects
sweep_cols.matrix | Suptract a elements of a vector from respective columns of a matrix

## -- T --

term.list.formula | Functions for Querying, Validating and Extracting from Formulas
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.
trim_env.default | Make a copy of an environment with just the selected objects.
trim_env.environment | Make a copy of an environment with just the selected objects.

## -- U --

ult | Extract or replace the _ult_imate (last) element of a vector or a list, or an element counting from the end.
ult<- | Extract or replace the _ult_imate (last) element of a vector or a list, or an element counting from the end.
unused_dots_warning | An error handler for 'rlang::check_dots_used()' that issues a warning that only lists argument names.
unwhich | Construct a logical vector with 'TRUE' in specified positions.
update.Welford | A Welford accumulator for sample mean and variance
UPDATE_MY_SCTRL_EXPR | Helper functions used by packages to facilitate 'snctrl' updating.
update_snctrl | Helper functions used by packages to facilitate 'snctrl' updating.

## -- V --

var.mcmc.list | Utility operations for 'mcmc.list' objects
vector.namesmatch | reorder vector v into order determined by matching the names of its elements to a vector of names

## -- W --

Welford | A Welford accumulator for sample mean and variance
which_top_n | Top or bottom 'n' elements of a vector
wmatrix | A data matrix with row weights
wmatrix_weights | Set or extract weighted matrix row weights

## -- X --

xAxT | Common quadratic forms
xTAx | Common quadratic forms
xTAx_eigen | Common quadratic forms
xTAx_qrsolve | Common quadratic forms
xTAx_qrssolve | Wrappers around matrix algebra functions that pre-_s_cale their arguments
xTAx_seigen | Wrappers around matrix algebra functions that pre-_s_cale their arguments
xTAx_solve | Common quadratic forms
xTAx_ssolve | Wrappers around matrix algebra functions that pre-_s_cale their arguments

## -- misc --

$.control.list | Named element accessor for ergm control lists
.Deprecate_method | Utilities to help with deprecating functions.
.Deprecate_once | Utilities to help with deprecating functions.
[.term_list | A helper class for list of terms in an formula
[.wmatrix | A data matrix with row weights
[<-.wmatrix | A data matrix with row weights