CLD: Create a causal loop diagram (CLD) object

View source: R/CLD.R

CLDR Documentation

Create a causal loop diagram (CLD) object

Description

Create a causal loop diagram (CLD) object

Usage

CLD(from, to, polarity = 1, weight = 1)

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.

polarity

A numeric vector containing the edge polarities. Must be either a scalar or a vector the same length as from and to; and must contain values in c(-1,1). Defaults to 1 for all edges.

weight

A numeric vector containing the edge weights (e.g., importance weights). Must be the same length as from and to and must contain values in 1:5. Defaults to 1 for all edges.

...

Additional arguments passed to formatEdges().

Value

A CLD object. This is a list with the following elements:

  • edf An edge data frame with the following columns:

    • from — Source variable for the edge. Class character.

    • to — Destination variable for the edge. Class character.

    • polarity — Edge polarities. Class integer.

    • weight — Edge weights (e.g., importance weight). Class integer.

Examples

L <- CLD(from=c("a","a","c","c","d"), to=c("b","c","a","d","a"))
L$edges



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