mediators-set: Set Mediators

mediators<-R Documentation

Set Mediators

Description

This is an setter method for mediators in an S4 object, usually of class mediation_data.

Usage

mediators(object) <- value

Arguments

object

An object whose mediators slot to modify.

value

The new mediator values to set within object.

Value

Modifies the mediators slot of the input object in place.

Examples

exper <- demo_joy() |>
    mediation_data("PHQ", "treatment", starts_with("ASV"))
mediators(exper) <- data.frame(new_ASV = rnorm(100))
mediators(exper)

multimedia documentation built on Sept. 30, 2024, 9:28 a.m.