Learn R Programming

NetRep (version 1.0.2)

netPropsInternal: Internal function for calculating 'networkProperties'

Description

This function is used by several package functions. It assumes that all user input has been processed already by processInput. This allows for function-specific checking (i.e. failing early where the 'data' is required), while avoiding duplication of time-intensive checks (e.g. CheckFinite).

Usage

netPropsInternal(network, data, moduleAssignments, modules, discovery, test, nDatasets, datasetNames, verbose, loadedIdx, dataLoaded, networkLoaded, keepLast = FALSE)

Arguments

network
'network' after processing by 'processInput'.
data
'data' after processing by 'processInput'.
moduleAssignments
'moduleAssignments' after processing by 'processInput'.
modules
'modules' after processing by 'processInput'.
discovery
'discovery' after processing by 'processInput'.
test
'test' after processing by 'processInput'.
nDatasets
a vector containing the total number of input datasets, returned by 'processInput'.
datasetNames
a vector of dataset names returned by 'processInput'.
verbose
logical; should progress be reported? Default is TRUE.
loadedIdx
index of the currently loaded dataset.
dataLoaded
reference to currently loaded data matrix (may be NULL).
networkLoaded
reference to currently loaded network matrix.
keepLast
logical; should the dataset processed last be kept in RAM?

Value

A list of network properties, and also the currently loaded dataset if keepLast is TRUE.