% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deprec-shift.R
\name{shift}
\alias{shift}
\title{Shift values in a single-case data file}
\usage{
shift(data, value, var)
}
\arguments{
\item{data}{A single-case data frame. See \code{\link[=scdf]{scdf()}} to learn about this
format.}

\item{value}{Number by which to shift the values}

\item{var}{Character string with the name of the target variable.
Defaults to the measurement time variable.}
}
\value{
A scdf with shifted data
}
\description{
\emph{This function has been superseded by the much more versatile
\code{\link{transform.scdf}} function.}
Shifting the values might be helpful in cases where the measurement time
is given as a time variable (see example below).
}
\examples{
### Shift the measurement time for a better estimation of the intercept
ex <- shift(example_A24, value = -1996)
plm(ex)

# Please use transform instead:
example_A24 |>
  transform(year = year - 1996) |>
  plm()
}
\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{set_vars}()},
\code{\link{smooth_cases}()},
\code{\link{standardize}()},
\code{\link{truncate_phase}()}
}
\concept{data manipulation functions}
\keyword{internal}
