bugPSPP - Bugs: bug #27417, Add Files not implemented

 
 

bug #27417: Add Files not implemented

Submitter:  None
Submitted:  Thu 10 Sep 2009 03:13:43 PM UTC
   
 
Category:  System/Portable File I/O Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 10 Sep 2009 05:06:29 PM UTC, comment #1: 

ADD FILES is already implemented for the upcoming 0.7.x release of PSPP, so I'm closing this bug.

Ben Pfaff <blp>
Group administrator
Thu 10 Sep 2009 03:13:43 PM UTC, original submission:  

Looking at the input/output features of pspp, it seems that the unimplemented ADD FILES command is a major feature -that is there is no convenient 'union' command for system files.

Being new to PSPP it is not obvious how to program this feature but, perhaps the suggestion that the ADD FILES is just a special cases of the MATCH FILES may help.

ADD FILES can be replicated using MATCH FILES if each system file to be 'added' has a unique sequential ID variable - as in:

-------------------------------------------
** convert add files to match files .

add files
  /file='temp1'
  /file='temp2'
  .

get file 'temp1'.
compute FILEID=1.
save out='temp1'.
get file 'temp2'.
compute FILEID=2.
save out='temp2'.
match file
   /file='temp1'
   /file='temp2'
   /by=FILEID
   /drop=FILEID .
list.




data list free/v1 v2.
begin data.
111 112
121 122
end data.
save out='temp1'.
data list free/v2 v3.
begin data.
212 213
222 223
end data.
save out='temp2'.
add files
  /file='temp1'
  /file='temp2'.
list.

OR

get file 'temp1'.
compute FILEID=1.
save out='temp1'.
get file 'temp2'.
compute FILEID=2.
save out='temp2'.
match file
   /file='temp1'
   /file='temp2'
   /by=FILEID
   /drop=FILEID .
list.

should yield ...

      V1       V2       V3

  111.00   112.00      .
  121.00   122.00      .
     .     212.00   213.00
     .     222.00   223.00

-------------------------------------------
Note that if the ADD FILES has a BY clause for 'interleaving' this can be emulated by adding the FILEID to the BY list.
-------------------------------------------

Clearly it is inefficient to read and write the files with a 'FILEID' added, so, if a constant variable can be created on the fly during the read of each system file in the ADD FILES, the MATCH FILE code can be 'easily' morphed into an ADD FILES command code.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-09-10 blp StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code