Edit a Dataset using an X11 Window

DESCRIPTION:
Creates a window in which you can edit the object.

USAGE:
data.ed(values, gui=options("gui")[[1]], display=getenv("DISPLAY"),
   width=<<see below>>, height=<<see below>>, cellwidth=<<see below>>,
   mousecommit=<<see below>>)

REQUIRED ARGUMENTS:
values:
any S-PLUS matrix, vector, data frame, or atomic dataset.

OPTIONAL ARGUMENTS:
gui:
character string for selecting the graphical user interface style, either "motif" or, on systems for which it is defined, "openlook". Unless you have set the gui in .Options, the default will be "motif".
display:
the display to put the window on. This defaults to $DISPLAY.
width:
number of columns of data to display. This defaults to the xCells X resource value, which is 10 by default.
height:
number of rows of data to display. This defaults to the yCells X resource value, which is 10 by default.
cellwidth:
the column width in characters. This defaults to the cellWidth X resource value; this is 10 by default.
mousecommit:
logical flag: if TRUE, selecting another cell with the mouse automatically commits the value in the current cell. If FALSE, you must commit all values with the commit button, or use one of the keys described below. This defaults to the mouseCommit X resource value, which is TRUE by default.

VALUE:
the input object, values, as modified during your use of the data editor. If the input object contains category or factor objects, and you have added values not currently in the levels attribute, the new levels will be appended to the end of the levels and labels attributes.

To cancel all changes and exit press the "Abort" button. In this case data.ed returns nothing.


SIDE EFFECTS:
data.ed creates a spreadsheet like window on the current display device.

DETAILS:
To exit the data editor, end your session with the "Quit" button.

To change the viewing window use the scroll bars.

To change a value, click on the appropriate cell, then type in an expression. To commit the change click on the "Commit" button, or use one of the motion keys described below which also commits the value. If mousecommit=T, selecting another cell with the mouse commits any changes made in the previously selected cell.

If the expression is a single number (for numeric datasets) or any string of characters (for character datasets), it can be typed in directly. Non-numeric values cannot be entered into numeric columns.

You can also enter expressions to be evaluated by S-PLUS. Precede any such expressions with an = sign. For instance, if you type =a*5, the expression a*5 will be sent to S-PLUS, and the result of S-PLUS's evaluation of the expression will be placed in the cell. If the evaluation fails, the value of the cell will not be changed. If you want to type in a character string that begins with an = sign, use == in that case. Note that the expression is not stored in data editor cells; only the result of the evaluation at the time the cell is committed is stored. Note that you cannot reference another cell in your current data editor session when you type in an expression for evaluation. If you do, S-PLUS will use the value that was in the cell before you began the data editor session.

To change the selected cell you can use the arrow keys, TAB (right), SHIFT TAB (left) or RETURN (down). (TAB and SHIFT TAB have a different meaning for gui=motif). All of those keys commit any changes made to the previously selected cell. To cancel any uncommitted changes, click on the "Restore" button. You can also use the mouse to change the selected cell.


LIMITATIONS:
In the current implementation you cannot add or delete rows or columns in the data editor.

You cannot choose different widths for different columns, nor change column width once the data editor session has begun.

If you attempt to resize your data editor window on the screen using your window manager, it will result in odd geometry for the data editor window. We do not recommend resizing the data editor window using your window manager.


RECOMMENDATIONS:
At this time, we recommend that you choose the data editor gui style which matches your window manager for optimum performance.

X:
The X resources used by the data editor are determined by concatenating "sde", a mapping of the gui string, and the resource name. The gui strings are mapped as follows: gui=motif is mapped to "Motif" and gui=openlook is mapped to "OpenLook". For example, if you are using gui=motif, the xCells resource is "sdeMotif.xCells".

NOTE:
The mode of the dataset is preserved throughout.

SEE ALSO:
vi , options .

EXAMPLES:
y <- data.ed(x)