\Header{new.name}{Obtain a name for a new variable that is not already in use}
\keyword{models}{new.name}
\keyword{smooth}{new.name}
\keyword{regression}{new.name}
\begin{Description}\relax
\code{\Link{gamm}} works by transforming a GAMM into something 
that can be estimated by \code{\Link{lme}}, but this involves creating new 
variables, the names of which should not clash with the names of other 
variables on which the model depends. This simple service routine checks a 
suggested name against a list of those in use, and if neccesary modifies it 
so that there is no clash.
\end{Description}
\begin{Usage}
\begin{verbatim} new.name(proposed,old.names)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{proposed}] a suggested name
\item[\code{old.names}] An array of names that must not be duplicated
\end{ldescription}
\end{Arguments}
\begin{Value}
A name that is not in \code{old.names}.
\end{Value}
\begin{Author}\relax
Simon N. Wood \email{simon@stats.gla.ac.uk}
\end{Author}
\begin{References}\relax
\url{http://www.stats.gla.ac.uk/~simon/}
\end{References}
\begin{SeeAlso}\relax
\code{\Link{gamm} }
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
old <- c("a","tuba","is","tubby")
new.name("tubby",old)
\end{ExampleCode}
\end{Examples}

