\HeaderA{new.name}{Obtain a name for a new variable that is not already in use}{new.name}
\keyword{models}{new.name}
\keyword{smooth}{new.name}
\keyword{regression}{new.name}
\begin{Description}\relax
\code{\LinkA{gamm}{gamm}} works by transforming a GAMM into something 
that can be estimated by \code{\LinkA{lme}{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.wood@r-project.org}
\end{Author}
\begin{References}\relax
\url{http://www.maths.bath.ac.uk/~sw283/}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{gamm}{gamm} }
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
old <- c("a","tuba","is","tubby")
new.name("tubby",old)
\end{ExampleCode}
\end{Examples}

