[Top][All Lists]

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

Re: Matching 2 files...Simple Question?

From: John Darrington
Subject: Re: Matching 2 files...Simple Question?
Date: Sat, 5 Jun 2010 10:23:51 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

All the subcommands except /FILE and /BY are optional (as indicated in the 
/FILE indicates the sources you want to match. /BY indicates the variable (which
should exist in both sources) upon which you want to perform the match.

The optional /IN subcommand, according to the manual "... creates a numeric 
variable ... which
takes the value 1 ... if the input file contributed to that case, and 0 

For example try the following snippet.

        * Create file1.

        new file.
        data list notable list /code * x *.
        begin data.
        90 0
        91 1
        92 2
        93 3
        end data.

        save outfile='file1'.

        * Create file2.
        new file.

        data list notable list /code * y *.
        begin data.
        92  22
        93  23
        94  24
        95  25
        96  26
        end data.

        save outfile='file2'.

        * clear the working dataset
        new file.

        * Join file1 and file2 on their CODE variable, and leave the result in 
          working dataset.  Additionally, create two new variables, FROM1 and 
          which indicate the source of each observation.

        match files 


On Fri, Jun 04, 2010 at 06:01:28AM -0700, Clarry wrote:
     I am very new to PSPP and have no knowledge of Syntax, although i can see
     the logic of something once shown. 
     I have looked at the manual, at this: 
     /RENAME=(src names=target names). . . 
     /IN=var name 
     /BY=var list 
     /DROP=var list 
     /KEEP=var list 
     /FIRST=var name 
     /LAST=var name 
     but have no idea what to do with IN, BY, DROP, etc. Or the conventions 
     If someone uses the parameters required to match one variable (let's call 
     "CODE") from File 1 to the same variable in File 2 then rename the new file
     File 3, I would be able to adapt. 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature

reply via email to

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