addEffect {MoNAn}R Documentation

addEffect

Description

A function to add addtional effects to a moman effects object

Usage

addEffect(effectsObject, effectName, ...)

Arguments

effectsObject

The monan Effects object to which another effect should be added.

effectName

The name of the effect that should be added (e.g. loops).

...

Additional parameters of the effect, for example alpha, attribute.index, or resource.attribute.index

Value

An object of type effectsList.monan

Examples

# Create effects object and add effects
myE1 <- createEffects(myState)
myE1 <- addEffect(myE1, loops)
myE1 <- addEffect(myE1, reciprocity_basic)
myE1 <- addEffect(myE1, effectName = same_covariate, attribute.index = "region")

# Or simpler
myE1 <- createEffects(myState) |>
  addEffect(loops) |>
  addEffect(reciprocity_basic) |>
  addEffect(same_covariate, attribute.index = "region")

[Package MoNAn version 1.0.0 Index]