pspp-users
[Top][All Lists]
Advanced

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

Re: reading a csv file


From: Ben Pfaff
Subject: Re: reading a csv file
Date: Fri, 05 Jan 2007 11:04:28 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Stefano Mazzuco <address@hidden> writes:

> Sorry for a probably stupid question but I'm quite new to pspp and cannot
> find a proper answer in the manual.
>
> I'm trying to read a dataset in "comma-separated" format. A problem I have
> in doing this is that variables names are already in the data file in the
> first line, but I don't know how to tell it to pspp.

If the format of the CSV file is sufficiently simple (i.e. no
quoted fields) then you should be able to use DATA LIST LIST with
',' as delimiter character and specifying SKIP=1 to skip the
first line.  If you're using PSPP 0.4.0, instead of the version
from CVS, then the SKIP subcommand won't be available, and you
can do something like the following to simulate it:
        COMPUTE SEQ=$CASENUM.
        EXECUTE.
        SELECT IF SEQ <> 1.
-- 
Ben Pfaff 
email: address@hidden
web: http://benpfaff.org




reply via email to

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