retrieve_names: Variables in a Multimedia Object

View source: R/lookup.R

retrieve_namesR Documentation

Variables in a Multimedia Object

Description

This returns all the variables modeled within a multimedia object. This can be helpful for overviewing an experiment and is called by the print methods in this package. Also supports filtering to specific node types, e.g., mediators.

Usage

retrieve_names(object, nm)

Arguments

object

An object of class multimedia

nm

A string specifying the node type to filter down to, e.g., 'treatment' or 'mediator'.

Value

A character vector containing all the names of the variables of the node type nm.

Examples

exper <- demo_joy() |>
    mediation_data("PHQ", "treatment", starts_with("ASV"))
multimedia(exper) |>
    retrieve_names("mediator")

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