SPSS read plain text file

A plain text file is a common format file. According to the sorting method of data in a plain text file, it can be divided into free format and fixed format. Free-form text files must have delimiters between data items, and fixed-format data items do not require delimiters.

1. Read data in free format

(1) Select "File" - "Open" - "Data", select the file type "Text", and click Open

(2) Step 1/6 after clicking Open, as shown in the figure below, continue to click Next

 

(3) Step 2/6 is as follows, how should the variables be arranged and selected? Select Delimited, click Next

 

 (4) Step 3/6, select all cases and click Next

 

(5) Step 4/6 is shown in the figure below, click Next

 

(6) Step 5/6 is shown in the figure below, click Next

 

(7) Step 6/6, as shown in the figure below, click Finish

 

(8) The read data is shown in the figure below

 

2. Read in data in a fixed format

(1) Select "File" - "Import Data" - "Text Data", as shown in the figure below, select the file to be opened, select the local encoding for the encoding, otherwise it cannot be opened, and then click Open

 (2) Step 1/6 is as shown below, click Next

 

(3) Step 2/6 is as shown below, in which how to arrange the variables select a fixed width, click Next 

 

 (4) Step 3/6 is shown in the figure below, select all cases and click Next

 

 (5) Step 4/6, divide the boundary, click next after the boundary is completed

 

(6) Step 5/6 is shown in the figure below, click Next 

 

(7) Step 6/6 is shown in the figure below, click Next 

 

(8) The interface after successfully reading the data is shown in the figure below

 

 


Note: The software used in this article is SPSS25.0

Guess you like

Origin blog.csdn.net/m0_64087341/article/details/131573087