\Header{tcut}{Factors for person-year calculations}
\alias{[.tcut}{tcut}
\keyword{survival}{tcut}
\keyword{manip}{tcut}
\begin{Description}\relax
Attaches categories for person-year calculations to a variable without
losing the underlying continuous representation
\end{Description}
\begin{Usage}
\begin{verbatim}
tcut(x, breaks, labels, scale=1)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] numeric/date variable 
\item[\code{breaks}] breaks between categories, which are right-continuous 
\item[\code{labels}] labels for categories 
\item[\code{scale}] Multiply \code{x} and \code{breaks} by this.
\end{ldescription}
\end{Arguments}
\begin{Value}
An object of class \code{tcut}
\end{Value}
\begin{SeeAlso}\relax
\code{\Link{cut}}, \code{\Link{pyears}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
temp1 <- mdy.date(6,6,36)
temp2 <- mdy.date(6,6,55)# Now compare the results from person-years
#
temp.age <- tcut(temp2-temp1, floor(c(-1, (18:31 * 365.24))),
        labels=c('0-18', paste(18:30, 19:31, sep='-')))
temp.yr  <- tcut(temp2, mdy.date(1,1,1954:1965), labels=1954:1964)
temp.time <- 3700   #total days of fu
py1 <- pyears(temp.time ~ temp.age + temp.yr, scale=1) #output in days
py1
\end{ExampleCode}
\end{Examples}

