Discussion:
Importing Data
Tara McCoy
2018-01-27 15:32:31 UTC
Permalink
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
John Darrington
2018-01-27 15:49:05 UTC
Permalink
On Sat, Jan 27, 2018 at 09:32:31AM -0600, 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.

It does for me! Which version are you using?

J'
--
Avoid eavesdropping. Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
Tara McCoy
2018-01-28 21:09:43 UTC
Permalink
Hi John,

I tried it with the two most recent versions, I believe from November 2017
and Jan 2018. I used the Windows installers. Any ideas for what might be
going wrong?
Post by Tara McCoy
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.
It does for me! Which version are you using?
J'
--
Avoid eavesdropping. Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
--
Sent from Gmail Mobile. I apologize for any errors or typos.
ftr public
2018-01-27 18:36:53 UTC
Permalink
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
Post by Tara McCoy
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
https://lists.gnu.org/mailman/listinfo/pspp-users
Continue reading on narkive:
Loading...