pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: output as csv from console


From: Ben Pfaff
Subject: Re: output as csv from console
Date: Thu, 04 Nov 2010 20:29:18 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Björn Manke <address@hidden> writes:

> I’d like to output results to a csv file with semi-colons as separators and
> possibly some more custiomization.

Do you want all PSPP output in CSV format (all tables, for
example) or just to write the contents of the PSPP dataset in CSV
format?

You can do the former by invoking PSPP with "-o <filename>.csv -O
separator=';'".  It looks like the implementation won't properly
handle fields that contain semicolons though (they won't be quoted).

You can use SAVE TRANSLATE /TYPE=CSV to do the latter, with
/TEXTOPTIONS DELIMITER=';' to set a semicolon as the delimiter.

> a) Can this be done and if so, where and how? In the mysterious
> “devices” file? In the console command?

The "devices" file is no longer used by PSPP 0.7.5.  If you have
an old copy of one then you can delete it.

> b)      I can’t find any “devices” file, that is supposedly (according to
> documentation) handling the default behavior and seems to be the place for
> defining what I want to see in my file. Can I make my own? Any templates?

It looks like you are reading old documentation, probably for
version 0.6.2.  You can read the documentation for 0.7.5 here
(among other places):
        
http://pspp.benpfaff.org/~blp/pspp-master/20101104040502/user-manual/index.html

> c)       From pspp --help I learnt, that there is something like -O OPTION=
> VALUE, that looks like it could be helpful. Where can I find documentation
> about what OPTIONs and VALUEs exist?

The documentation above explains:
        
http://pspp.benpfaff.org/~blp/pspp-master/20101104040502/user-manual/html_node/Invoking-PSPP.html#Invoking-PSPP

> d)      Is it possible to suppress certain messages so that I get the raw
> results, i.e: running a correlation I don’t need any error messages or the
> like, just the naked result table values

You can turn off certain kinds of output with the SET command,
e.g. SET ERRORS=OFF MESSAGES=OFF PRINTBACK=OFF.  (I'm not sure
that we test this, and the implementation has changed in 0.7.x,
so please report problems.)
-- 
Ben Pfaff 
http://benpfaff.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]