% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set_vars.R
\name{set_vars}
\alias{set_vars}
\alias{set_dvar}
\alias{set_mvar}
\alias{set_pvar}
\title{Set analysis variables in an scdf object}
\usage{
set_vars(data, dvar, mvar, pvar)

set_dvar(data, dvar)

set_mvar(data, mvar)

set_pvar(data, pvar)
}
\arguments{
\item{data}{A single-case data frame. See \code{\link[=scdf]{scdf()}} to learn about this
format.}

\item{dvar}{Character string. Name of the dependent variable.}

\item{mvar}{Character string. Name of the measurement-time variable.}

\item{pvar}{Character string. Name of the phase variable.}
}
\value{
An \code{scdf} object with updated variable settings.
}
\description{
This function allows to set or change the dependent variable,
measurement-time variable, and phase variable in an scdf object.
}
\examples{
exampleAB_add |>
  set_dvar("depression") |>
  describe()
}
\seealso{
Other data manipulation functions: 
\code{\link{add_l2}()},
\code{\link{as.data.frame.scdf}()},
\code{\link{as_scdf}()},
\code{\link{batch_apply}()},
\code{\link{fill_missing}()},
\code{\link{moving_median}()},
\code{\link{print.sc_outlier}()},
\code{\link{ranks}()},
\code{\link{rescale}()},
\code{\link{scdf}()},
\code{\link{select_cases}()},
\code{\link{shift}()},
\code{\link{smooth_cases}()},
\code{\link{standardize}()},
\code{\link{truncate_phase}()}
}
\author{
Juergen Wilbert
}
\concept{data manipulation functions}
