You can search for characters or words in the levels or labels of a factor column and also replace these if required.
- Place the cursor in a factor column, then from the menu select Spread | Factor | Edit Levels and Labels.
- To carry out a search click Find.
If you want to find and overwrite existing values click Replace.
- Enter the data you want to look for in the Find what field.
If you are replacing a level or label, enter the replacement data in the Replace with field.
- Set options as required then use the buttons to carry out your action.
|Find and Replace dialog
|Match whole word only
|Only find labels/levels that match the exact text you typed.
|The search is case sensitive e.g. if you type ‘Acute’ in the Find what field, Genstat will not find ‘acute’ as the first character is not upper case.
|Wrap at end of list
|A search will continue from the start of the column when it reaches the end.
|Replace multiple occurrences within a cell
|(for replace only) Replace every occurrence of the text specified in the Find what field. If you do not select this option only the first match within a level or label will be replaced. For example, if a level contains the number ‘111’ then when this option is selected replacing ‘1’ with ‘2’ will result in ‘222’ and when this option is not selected the replaced text would result in ‘211’.
|Select whether to apply the search to levels or labels.
|The search starts from the cursor position. Up searches up to the top of the factor column. Down searches down to the bottom of the column. To search the entire column select Wrap at end of list.
|Search for the next occurrence of the characters specified in the Find what field.
|Replaces the current or next instance of the characters specified in the Find what field with the text in the Replace with field.
|Replaces every occurrence of the characters specified in the Find what field with the text in the Replace with field.
|Close the dialog.