R Commander Dataset Editor
Allows the user to enter a new dataset, modify data values in an existing dataset, add rows or columns to the dataset, or delete rows or columns.
- an R data frame to edit; this argument is optional, and if absent an empty data frame is created, into which the user can enter data.
- the quoted name of the data set, into which the edited data frame
will be placed in the global environment.
If absent and an existing data frame is edited, the modified
version will replace the original version; if absent and a new data set is
created, it will be given the name
editDataset is a straightforward spreadsheet-like data editor, suitable for
editing data frames that are not too large (say smaller than about 10,000 values).
- Use the mouse and the arrow keys to navigate the cells of the data table, including the row and column names.
- Columns consisting only of numbers will produce numeric variables in
the data frame constructed by
editDataset; columns with any non-numeric values will produce factors or (if they contain only the values
FALSE) logical variables.
- When entering values with embedded blanks, enclose the values in quotes
'less than HS').
- Clicking in a cell and typing a new value replaces the previous value.
- Row and column names can be modified in the same manner.
- Double-clicking in a cell deletes the previous value and replaces it with
- Enlarge the data set by pressing the Add row or Add column button
at the top of the data editor; the new row or column will initially be filled with
NAs and will have an auto-generated row or column name. Pressing the Enter or Return key will also add a row; pressing the Tab key will also add a column.
- Right-clicking (or Control-clicking, or under Mac OS X Command-clicking) brings up a context menu, permitting several operations on cells, rows, and columns, including deleting the current row or column.
- Similarly, several actions are available via the Edit menu.
- The key-combinations Control-x, and Control-v, may also be used respectively to cut, copy, and paste cell values. (Under Mac OS X, Command-x, Command-c, and Command-v also work.)
- Pressing the OK button or selecting Exit and save from the File menu exits the data edtior and saves the edited data set to the global environment. Pressing the Cancel button or selecting Cancel from the File menu exits the editor discarding the edited data set.
This function does not return a useful value, but has the side
effect of modifying or creating a data set in the global environment.
editDataset is limited to editing data frames that are composed only of
numeric, factor, and logical columns.
edit.data.frame, for the standard R data editor.
if (interactive()) editDataset()