internalFunctions: Internal functions in the causalloop package

internalFunctionsR Documentation

Internal functions in the causalloop package

Description

processEdgeInput() checks user-inputted edge specification for CLD manipulation functions.

allEdfNodesListedInNdf() checks to ensure that all nodes listed in the from and to columns of the edges table within a CLD object are contained in the node column within the nodes table.

Usage

processEdgeInput(from, to)

allEdfNodesListedInNdf(CLD)

Arguments

from

A vector of type character, providing the variables at the beginning of each (directional) causal link.

to

A vector of type character, containing the variables at the end of each (directional) causal link. Must be the same length as from.

CLD

a causal loop diagram (CLD) object.

Details

The parameters from and to must either be of equal length; or be of differing lengths, under the restriction that at least one of the two is of length 1.

Value

data frame containing the following variables:

Examples

processEdgeInput(from=c("a","a"), to=c("b")) #duplicates are removed w/ warning
processEdgeInput(from="a", to=c("b","c","d")) #replicates as in data.frame()
processEdgeInput(from=c("b","c","d"), to="z") #replicates as in data.frame()
processEdgeInput(from=c("a","b"), to=c("b","a","c")) #produces error as in data.frame()

jarrod-dalton/causalloop documentation built on May 10, 2022, 8:08 a.m.