\Header{dataentry}{Spreadsheet Interface for Entering Data}
\alias{data.entry}{dataentry}
\alias{de}{dataentry}
\alias{de.ncols}{dataentry}
\alias{de.restore}{dataentry}
\alias{de.setup}{dataentry}
\keyword{utilities}{dataentry}
\keyword{file}{dataentry}
\begin{Usage}
\begin{verbatim}
data.entry(..., Modes=NULL, Names=NULL)
dataentry(data, modes)
de(..., Modes=NULL, Names=NULL)
\end{verbatim}
\end{Usage}
\begin{Description}
This is a fairly big suite of programs designed to make the interface
to the spreadsheet painless for users.  \texttt{data.entry} has side
effects, any changes made in the spreadsheet are reflected in the
variables.  The functions \texttt{de}, \texttt{de.ncols}, \texttt{de.setup}
and \texttt{de.restore} are designed to help achieve these side effects.
If the user passes in a matrix, \texttt{X} say, then the matrix is
broken into columns before \texttt{dataentry} is called. Then on return
the columns are collected and glued back together and the result
assigned to the variable \texttt{X}.  If you don't want this behaviour
use dataentry directly.

The primitive function is \texttt{dataentry}. It takes a list of
vectors of possibly different lengths and modes (the second argument)
and opens a spreadsheet with these variables being the columns.
The columns of the dataentry window are returned as vectors in a
list when the spreadsheet is closed.

\texttt{de.ncols} counts the number of columns which are supplied as arguments
to \texttt{data.entry}. It attempts to count columns in lists, matrices
and vectors.  \texttt{de.setup} sets things up so that on return the
columns can be regrouped and reassigned to the correct name. This
is handled by \texttt{de.restore}.\end{Description}
\begin{SeeAlso}
\texttt{\Link{vi}}, \texttt{\Link{edit}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# call data entry with variables x and y
data.entry(x,y)
\end{ExampleCode}
\end{Examples}

