Learn R Programming

MoNAn (version 1.1.0)

addEffect: addEffect

Description

A function to add addtional effects to a moman effects object

Usage

addEffect(effectsObject, effectName, ...)

Value

An object of type effectsList.monan

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

Examples

Run this code
# 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")

Run the code above in your browser using DataLab