# editDataset

0th

Percentile

##### 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.

Keywords
manip
##### Usage
editDataset(data, dsname)
##### Arguments
data
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.
dsname
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<
##### Details

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 byeditDataset; columns with any non-numeric values will produce factors or (if they contain only the valuesTRUEandFALSE) logical variables.
• When entering values with embedded blanks, enclose the values in quotes (e.g,"some PS"or'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 withNA.
• Enlarge the data set by pressing theAdd roworAdd columnbutton at the top of the data editor; the new row or column will initially be filled withNAs and will have an auto-generated row or column name.
• Right-clicking (orControl-clicking, or under Mac OS XCommand-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 theEditmenu.
• The key-combinationsControl-candControl-vmay also be used respectively to copy and paste cell values. (Under Mac OS X,Command-candCommand-valso work.)
• Pressing theOKbutton or selectingExit and savefrom theFilemenu exits the data edtior and saves the edited data set to the global environment. Pressing theCancelbutton or selectingCancelfrom theFilemenu exits the editor discarding the edited data set.

##### Value

• This function does not return a useful value, but has the side effect of modifying or creating a data set in the global environment.

##### Note

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()