mediators: Access Class-Specific Mediators

mediatorsR Documentation

Access Class-Specific Mediators

Description

This is a shorthand for accessing mediator-related slots in classes exported by the multimedia package.

Usage

mediators(object)

Arguments

object

An object whose mediators we want to access (either their names or values).

Value

The output will depend on the class of the object that is passed in. For multimedia objects, this returns a character vector of mediators. For mediation data objects, this returns the mediator mediator data.

Examples

exper <- demo_joy() |>
    mediation_data("PHQ", "treatment", starts_with("ASV"))
mediators(exper)

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