Case Insertion Point
Your cursor will change to a horizontal ‘cross-beam’ in a variable editing window when the cursor is between cases. This cursor looks like this:
Click to insert a case, then type or paste.
Cases inserted in any variable are automatically inserted in all variables in the Relation (although, of course, they are empty in other variables until filled in.)
Test Insertion Point
Text editing in Data Desk works as it does elsewhere on your computer. Text is inserted at the blinking text insertion point or replaces the selected text.
One notable addition is that when editing the text in a derived variable or scratchpad, you may drag a variable into the window to enter its name’enclosed in single quotation marks at the insertion point.
Editing Sequence
When a variable is opened, a Sequence box is shown in the upper right corner of the variable editing window. It specifies the order of the variable editing sequence. Type in one window and press the Tab key to move to the next variable in the editing sequence (at the same case). A variable whose sequence box is gray is not in the editing sequence and will be skipped over by the Tab key. If the sequence box holds a number, then this number specifies the place of the window in the editing sequence.
To change the editing sequence click on the sequence box.
Find/Go To
With a variable editing window open and frontmost, choose the Find… command from the Edit menu. You will be prompted for the text to find. All cases that match the find criteria will be selected. (And, of course, they will highlight in all open windows and plots.)
According to the setting in the dialog, The Find command either finds all occurrences of the specified text or finds the first occurrence of the text after the current insertion point. It selects either any occurrence of the text string in each cell or restricts itself to looking for the whole word in each cell.
The next non-numeric case option in the Find dialog locates cases that are not numbers and would be treated as missing values in a calculation. It is particularly helpful for finding typographical errors.
Find Same moves to the next case that matches the search criteria most recently specified but does not prompt for new text or settings. It remains active only while there is text to find.
The Go To… submenu contains commands that help you step through selected cases. Because cases can be selected easily in any plot or editing window, it is common to have many cases selected that are not continuous. Most of the Go To… commands help you to look through the selected cases. The Go To… commands are:
- Go To Next Selected Case
- Go To Previous Selected Case
- Go To Top Selected Case
- Go To Bottom Selected Case
- Go To Case #…
The Go To Case #… command locates a case by its case or row number. The other Go To… commands step through selected cases either forward or backward.
Replace
Replaces selected text with the contents of the clipboard.
Cut/Copy/Clear
These commands operate on text as they do in ordinary editing.
They operate on selected cases as well. When a variable editing window is open, These commands operate on cases rather than on text (and change in the menu to reflect that.) You can Cut, Copy, or Clear cases that are not consecutive in the editing window (Data Desk will warn you that this operation cannot be Undone.)
Paste
The {Edit}Paste command changes according to circumstances. When you are editing text (for example, in a Scratchpad, Paste inserts whatever is on the Clipboard at the current insertion point.
If the frontmost window is a variable editing window the Paste command will change according to your cursor status. If you are editing the text within a case, Paste works as it would in any text editor.
However, if the frontmost window shows a blinking Case Insertion Point, then the command changes to Paste Cases. Pasted text will start new cases. If the clipboard holds a tab-delimited data table, you can paste data into multiple variable windows according to the Editing Sequence.
When the Clipboard contains text and the frontmost window is an icon window, the Paste command changes to {Edit} Paste Variables. Choose it to paste each column of the data table into the datafile as a variable. You do not need to create new variables first; Data Desk creates the variables you need.
Undo
Most editing operations can be undone. Chose {Edit}Undo.
Shift Cases
When an editing window is open an one or more consecutive cases are selected, Shift Cases Down creates as many new blank cases as are selected and inserts them at the top of the selected set of cases. Shift Cases Up clears the selected cases and moves remaining cases up to fill the space.
Money symbols and commas
Data Desk accepts data with money symbols ($, ‘, ‘, etc) and commas delimiting thousands, millions, etc. The symbols and commas are visible for editing, but ignored in plots and calculations.
If your computer is set to European standards in which the command decimal point play the opposite roles as they do in the U.S., Data Desk will use symbols consistent with your settings.
Comma delimiters are only recognized when they are in the right position. Commas placed elsewhere in numbers will cause Data Desk to see the number as text.
Missing values and Infinities
When Data Desk expects to find a number for a plot or calculation, but finds non-numeric text or a blank, it treats the value as missing. Most operations omit any case that has missing values on any of the variables in that operation. Missing values propagate correctly through calculations. (Data Desk uses the numeric NaN ‘Not a Number’ code to represent missing values.)
Operations that treat data as text (e.g. the x variable for Boxplot y by x, Frequency Breakdown, or Contingency Tables) recognize blank cases and the special ‘ character as missing.
You can make a case missing (and thus, omit it from your analyses) by typing a non-numeric character (for example a * or &) in front of the value. In this way, you can preserve the original value.
Note that typing a money symbol will not have this effect, but can be a way to mark a value as special without removing it from calculations.
Missing values can arise as a result of calculations. A derived variable that takes the square root of a variable will return missing values for any negative numbers in the original variable.
Some calculations can return infinity or negative infinity. Specifically, 1/0 = 8 and -1/0 = -8. Infinities sort correctly and operate correctly in functions that are only concerned with order, such as nonparametric tests.
Text and Numbers
When data are entered as text whether reading from a file or pasting from the clipboard Data Desk preserves the original text. Variables are converted only as needed for the calculation.