\Header{delete.response}{Modify terms objects}
\alias{reformulate}{delete.response}
\alias{drop.terms}{delete.response}
\keyword{programming}{delete.response}
\begin{Usage}
\begin{verbatim}
delete.response(termobj)
reformulate(termlabels,response=NULL)
drop.terms(termobj, dropx = NULL, keep.response = FALSE) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{termobj}] A \texttt{terms} object
\item[\texttt{termlabels}] vector of strings giving the right-hand side of a model formula
\item[\texttt{response}] string giving the left-hand side of a model formula
\item[\texttt{dropx}] vector of positions of variables to drop from the right-hand side of the model
\item[\texttt{keep.response}] Keep the response in the resulting object?
\end{ldescription}
\end{Arguments}
\begin{Description}
\texttt{delete.response} returns a \texttt{terms} object for the same model but with no response variable. \texttt{drop.terms} removes variables from the right-hand side of the model. \texttt{reformulate} creates a formula from a vector of strings.\end{Description}
\begin{Value}
\texttt{delete.response} and \texttt{drop.terms} return a \texttt{terms} object; \texttt{\Link{reformulate}} returns a \texttt{formula}.\end{Value}
\begin{SeeAlso}
\texttt{\Link{terms}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
ff<-y~z+x+w
tt<-terms(ff)
tt
delete.response(tt)
drop.terms(tt,2:3,keep.response=T)
reformulate(attr(tt,"term.labels"))
\end{ExampleCode}
\end{Examples}

