[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Importing data from other file formats than .sav
From: |
John Darrington |
Subject: |
Re: Importing data from other file formats than .sav |
Date: |
Sun, 15 Nov 2009 07:21:14 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
My guess is that you're running under a locale which uses the comma as the
decimal separator instead
of the dot (fr_CA ?). If this is the case, then obviously none of the strings
in your file are valid
numbers. Either do "SET DECIAML=DOT." or change all the "." characters to ","
in your file or run
under an English locale.
J'
On Fri, Nov 13, 2009 at 09:12:45PM -0800, Erik Frebold wrote:
I'm having a bit of difficulty getting this to happen. What I'd like to do
is get pspp to read data files output from simple python modules. Thus far,
I've been trying to use psppire's "import delimited text data" function. Have
saved small test files variously as .txt, .csv, or as a .csv with python-added
commas between values. In all cases the data look fine in the home program, and
also look fine in psppire's import function right up to the last step "ok",
whereupon they produce multiple errors of the type: "dataSet.csv:1: data file
warning: (columns 1-0, F field) Number followed by garbage." Only when each
data value is separated from the next by a comma (and no spaces or carriage
returns) do I escape these errors, but then each datum heads its own variable
column in psppire.
Meanwhile, same file saved as .ods (open document format spreadsheet) or
as a Gnumeric spreadsheet import to psppire as what I would term heiroglyphics,
probably pspp valiantly trying to cope with XML. I see the GET DATA command in
the pspp syntax has a gnumeric import option, but there doesn't seem to be a
similar openOffice option.
Perhaps the way to tackle this is to use a pspp syntax window with "BEGIN
DATA" and "DATA LIST" or "GET DATA"? (on some sort of .csv or .txt file?) Does
pspp require each imported datum to be exactly the same length (i.e. same
precision)?
A few suggestions to set me on the right track would be helpful as I've
run out of ideas.
Small sample file attached in case that helps.
-2.283299080490
-1.433253709580
0.799817852956
0.255849914082
1.101804297390
0.077398610296
0.041571498593
-1.025534873140
-0.738748219309
-0.271639091163
-1.481500311030
0.115492084553
0.880275080400
0.102499082712
1.672766757970
1.350374691930
0.546701377359
0.600740940308
0.432826586026
2.303603918840
_______________________________________________
Pspp-users mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/pspp-users
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature