On Wed, Sep 30, 2009 at 08:24:15AM +0100, Sohail Husain wrote:
     What is the best way to add cases to an existing data file, retaining all
     variable/value labels etc?  
     The additional cases are currently in a csv file.

I think you would have to save the existing file, then add the csv file to it. 
For example, assuming you have 3 variables x, y & z then the following should
do the trick:

FILE HANDLE temp /MODE=SCRATCH.
SAVE /OUTFILE=temp .

GET DATA /TYPE=TXT  /FILE='foo.csv' 
        /DELIMITERS=","
        /VARIABLES= a f8.2  b f8.2  c f8.2 .

ADD FILES /FILE=temp /FILE=*.

CLOSE FILE HANDLE temp.
      
     Conversely, what is the best way to delete individual cases or a range of
     cases?

If you are using PSPPIRE, then you can do this manually.  Alternatively, you
could use SELECT IF or FILTER followed by EXECUTE.


Hope this helps.

J'

-- 
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.


Attachment: signature.asc
Description: Digital signature

_______________________________________________
Pspp-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-users

Reply via email to