Hi Tara,
I guess you use the GUI. If you look into the manual and look how to
import csv or ods files you avoid this error.
Look for the GET DATA command:
9.4.3 Textual Data Files
GET DATA /TYPE=TXT
/FILE={’file_name’,file_handle}
[ENCODING=’encoding’]
[/ARRANGEMENT={DELIMITED,FIXED}]
[/FIRSTCASE={first_case}]
[/IMPORTCASES=...]
…additional subcommands depending on ARRANGEMENT…
When TYPE=TXT is specified, GET DATA reads data in a delimited or fixed
columnar format, much like DATA LIST (see DATA LIST
<https://www.gnu.org/software/pspp/manual/html_node/DATA-LIST.html#DATA-LIST>).
The |FILE| subcommand is mandatory. Specify the file to be read as a
string file name or (for textual data only) a file handle (see File
Handles
<https://www.gnu.org/software/pspp/manual/html_node/File-Handles.html#File-Handles>).
The |ENCODING| subcommand specifies the character encoding of the file
to be read. See INSERT
<https://www.gnu.org/software/pspp/manual/html_node/INSERT.html#INSERT>,
for information on supported encodings.
The |ARRANGEMENT| subcommand determines the file’s basic format.
DELIMITED, the default setting, specifies that fields in the input data
are separated by spaces, tabs, or other user-specified delimiters. FIXED
specifies that fields in the input data appear at particular fixed
column positions within records of a case.
By default, cases are read from the input file starting from the first
line. To skip lines at the beginning of an input file, set |FIRSTCASE|
to the number of the first line to read: 2 to skip the first line, 3 to
skip the first two lines, and so on.
|IMPORTCASES| is ignored, for compatibility. Use |N OF CASES| to limit
the number of cases read from a file (see N OF CASES
<https://www.gnu.org/software/pspp/manual/html_node/N-OF-CASES.html#N-OF-CASES>),
or |SAMPLE| to obtain a random sample of cases (see SAMPLE
<https://www.gnu.org/software/pspp/manual/html_node/SAMPLE.html#SAMPLE>).
The remaining subcommands apply only to one of the two file
arrangements, described below.
• GET DATA /TYPE=TXT /ARRANGEMENT=DELIMITED
<https://www.gnu.org/software/pspp/manual/html_node/GET-DATA-_002fTYPE_003dTXT-_002fARRANGEMENT_003dDELIMITED.html#GET-DATA-_002fTYPE_003dTXT-_002fARRANGEMENT_003dDELIMITED>:
• GET DATA /TYPE=TXT /ARRANGEMENT=FIXED
<https://www.gnu.org/software/pspp/manual/html_node/GET-DATA-_002fTYPE_003dTXT-_002fARRANGEMENT_003dFIXED.html#GET-DATA-_002fTYPE_003dTXT-_002fARRANGEMENT_003dFIXED>:
HTH
- ftr
On 27/01/2018 16:32, Tara McCoy wrote:
Hi - when I try importing a .csv file into PSPP it does not give me
the option to indicate that the first row of data includes the
variable names. It also does not automatically import them as names. I
have uninstalled and re-installed PSPP multiple times while also
creating different .csv files but the variable names still do not appear.
I then tried to import using a .ods (LibreOffice). I was able to get
the titles in (as the checkbox for this appeared); however, some of my
variables in only the first row of select columns are identified as
string variables and removed from just the first row upon importing. I
have checked - rechecked the format properties of these cells to
ensure they are numeric, but the same issue for the same columns
continues to occur.
I'm at a bit of a loss for what to do next. Any suggestions are much
appreciated!
--
Tara McCoy, PhD
Personality and Identity Lab
Department of Psychology
University of California, Riverside
900 University Avenue
Riverside, CA 92521
_______________________________________________
Pspp-users mailing list
Pspp-users@gnu.org
https://lists.gnu.org/mailman/listinfo/pspp-users
_______________________________________________
Pspp-users mailing list
Pspp-users@gnu.org
https://lists.gnu.org/mailman/listinfo/pspp-users