Learn R Programming

multimedia (version 0.2.0)

outcomes,mediation_data-method: Outcomes Data in a Mediation Data Object

Description

This is an accessor function to the @outcomes slot in a mediation data object. It returns the entire outcomes dataset, in contrast to outcomes() applied to a multimedia object, which only returns the names of the outcome variables.

Usage

# S4 method for mediation_data
outcomes(object)

Value

A data.frame whose rows are samples and columns different outcomes.

Arguments

object

An object of class mediation_data.

Examples

Run this code
exper <- demo_joy() |>
    mediation_data("PHQ", "treatment", starts_with("ASV"))
outcomes(exper)

Run the code above in your browser using DataLab