A spreadsheet-like editor for entering or editing data.

```
data.entry(…, Modes = NULL, Names = NULL)
dataentry(data, modes)
de(…, Modes = list(), Names = NULL)
```

…

A list of variables: currently these should be numeric or character vectors or list containing such vectors.

Modes

The modes to be used for the variables.

Names

The names to be used for the variables.

data

A list of numeric and/or character vectors.

modes

A list of length up to that of `data`

giving the
modes of (some of) the variables. `list()`

is allowed.

`de`

and `dataentry`

return the edited value of their
arguments. `data.entry`

invisibly returns a vector of variable
names but its main value is its side effect of assigning new version
of those variables in the user's workspace.

The data entry window responds to X resources of class
`R_dataentry`

. Resources `foreground`

, `background`

and
`geometry`

are utilized.

The data entry editor is only available on some platforms and GUIs. Where available it provides a means to visually edit a matrix or a collection of variables (including a data frame) as described in the Notes section.

`data.entry`

has side effects, any changes made in the
spreadsheet are reflected in the variables. The functions `de`

,
`de.ncols`

, `de.setup`

and `de.restore`

are designed to
help achieve these side effects. If the user passes in a matrix,
`X`

say, then the matrix is broken into columns before
`dataentry`

is called. Then on return the columns are collected
and glued back together and the result assigned to the variable
`X`

. If you don't want this behaviour use dataentry directly.

The primitive function is `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.

`de.ncols`

counts the number of columns which are supplied as arguments
to `data.entry`

. It attempts to count columns in lists, matrices
and vectors. `de.setup`

sets things up so that on return the
columns can be regrouped and reassigned to the correct name. This
is handled by `de.restore`

.

```
# NOT RUN {
# call data entry with variables x and y
# }
# NOT RUN {
data.entry(x, y)
# }
```

Run the code above in your browser using DataLab