% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ts_long_wide.R
\name{ts_long}
\alias{ts_long}
\alias{ts_wide}
\title{Reshaping Multiple Time Series}
\usage{
ts_long(x)

ts_wide(x)
}
\arguments{
\item{x}{a ts-boxable time series, or a wide \code{data.frame},
\code{data.table}, or \code{tibble}.}
}
\value{
object with the same class as input
}
\description{
Functions to reshape multiple time series from 'wide' to 'long' and vice
versa. Note that long format data frames are ts-boxable objects, where wide
format data frames are not. \code{ts_long} automatically identifies a \strong{time}
column, and uses columns on the left as id columns.
}
\examples{
df.wide <- ts_wide(ts_df(ts_c(mdeaths, fdeaths)))
head(df.wide)
head(ts_long(df.wide))
}
