DELIMITER= or SEPARATOR= data field delimiters = " ", fixed fields |
Top Up Down
A A |
It is often convenient to organize your data with delimiters, such as commas, semi-colons or spaces, rather than in fixed column positions. However, often the delimiter (a Tab, space or comma) only takes one column position. In which case, it may be easier to include it in the CODES= or use MFORMS= or FORMAT=.
To check that your data file has decoded properly, look at RFILE=
To do this, specify the following command DELIMITER= value (or SEPARATOR= value). This value is the separator.
Examples: DELIMITER= " " fixed-field values
DELIMITER= "," comma-separated values CSV. The , must be ","
DELIMITER=BLANK blank-separated values
or DELIMITER=SPACE space-separated values
DELIMITER=TAB tab-separated values
DELIMITER=";" semi-colon separated values. The ; must be ";", otherwise it is treated as a comment.
When decoding delimited values, leading and trailing blanks, and leading and trailing quotation marks, " " and ' ' in each value field are ignored. Responses are left-aligned, and sized according to XWIDE=.
For NAME1= and ITEM1=, specify the value number in the data line, starting with 1 as the leftmost value. FORMAT= does not apply to this data design.
Combine your person name and demographic information into one field that is to be referenced by NAME1=.
Example 1 of a data line:
; the following is ONE data line:
"01"; 02; "01"; "01"; "01"; 00; 02; 00; "01"; 02; 02; 02; 02; 00; 02; "01"; "01"; 02; 02 ; 00; 02; "01"; 00; 02; 00; ROSSNER, MARC DANIEL
;which decodes as:
01020101010002000102020202000201010202000201000200ROSSNER, MARC DANIEL
ITEM1=1 ; item responses start in first field
NI=25 ; there are 25 responses, i.e., 25 response fields
NAME1=26 ; the person name is in the 26th field
DELIMITER = ";" ; the field delimiters are semi-colons
XWIDE=2 ; values are right-aligned, 2 characters wide.
CODES=000102 ; the valid codes.
NAMLEN=20 ; override standard person name length of 30 characters.
Example 2 of a data line:
; the following is ONE data line:
ROSSNER - MARC DANIEL, "01", 02 , "01", "01", "01", 00, 02, 00, "01", 02, 02, 02, 02, 00, 02, "01", "01", 02, 02, 00, 02, "01", 00, 02, 00
;which decodes as:
01020101010002000102020202000201010202000201000200ROSSNER - MARC DANIEL
ITEM1=2 ; item responses start in second field
NI=25 ; there are 25 responses, i.e., 25 response fields
NAME1=1 ; the person name is in the 1st field
DELIMITER = "," ; the field delimiters are commas (so no commas in names)
XWIDE=2 ; values are right-aligned, 2 characters wide.
CODES=000102 ; the valid codes
NAMLEN=20 ; override standard person name length of 30 characters.
Example: Here is the data file, "Book1.txt"
fred,1,0,1,0
george,0,1,0,1
Here is the control file:
name1=1 ; first field
item1=2 ; second field
ni=4 ; 4 fields
data=book1.txt
codes=01
delimiter = ","
&END
looking
viewing
peeking
seeking
END LABELS
Here is the reformatted file from the Edit Pull-Down menu: View Delimiter File:
1010fred
0101george
Suggestion:
If you data file can be conviently organized in columns:
fred ,1,0,1,0
george,0,1,0,1
then process the data file as fixed width fields
NAME1 = 1 ; start of person label "fred"
NAMELENGTH = 6 ; up to first comma
ITEM1 = 8 ; first column of numbers
XWIDE = 2 ; number + comma
CODES = "0,1,0 1 " ; the data codes "0 1 " are for the last codes on the line.
this will then analyze the data as a standard fixed-column rectangular data matrix.