Learn R Programming

scan (version 0.64.0)

set_vars: Set analysis variables in an scdf

Description

Set analysis variables in an scdf

Usage

set_vars(data, dvar, mvar, pvar)

set_dvar(data, dvar)

set_mvar(data, mvar)

set_pvar(data, pvar)

Arguments

data

A single-case data frame. See scdf() to learn about this format.

dvar

Character string. Name of the dependent variable.

mvar

Character string. Name of the measurement-time variable.

pvar

Character string. Name of the phase variable.

See Also

Other data manipulation functions: add_l2(), as.data.frame.scdf(), as_scdf(), fill_missing(), moving_median(), outlier(), ranks(), rescale(), scdf(), select_cases(), shift(), smooth_cases(), standardize(), truncate_phase()

Examples

Run this code
exampleAB_add |>
  set_dvar("depression") |>
  describe()

Run the code above in your browser using DataLab