pretreatments-set-mediation_data-method: Set the Pretreatments in a Mediation Data Object

pretreatments<-,mediation_data-methodR Documentation

Set the Pretreatments in a Mediation Data Object

Description

This is an setter method for the pretreatments slot in a mediation data object. It lets you supply a new pretreatments data.frame for the object.

Usage

## S4 replacement method for signature 'mediation_data'
pretreatments(object) <- value

Arguments

object

An object of class mediation_data.

value

The new pretreatment values for the object.

Value

A version of object whose pretreatments slot has been replaced.

Examples

exper <- demo_joy() |>
    mediation_data("PHQ", "treatment", starts_with("ASV"))
pretreatments(exper) <- data.frame(x = 1:10)
exper

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