dataset experiments (was: Re: DATASET behaviour)
I spent some time today studying some of the details of the SPSS "DATASET" commands. I think that perhaps I misunderstood exactly how they work. I'm suggesting two experiments to help clarify my understanding. Experiment #1 - Start up SPSS. Then, before you define any variables or open any data files, Run a DATASET NAME command, like this: DATASET NAME myfile. Does SPSS accept this or give an error and, if it gives an error, what is it? Experiment #2 - Start up SPSS. Then, before you do anything else, run a syntax file like this: GET 'file1.sav'. DATASET NAME file1. DATASET DISPLAY. GET 'file2.sav'. DATASET DISPLAY. Any file1.sav and file2.sav will do; please replace these names with names of different .sav files on your own system. Thanks, Ben. On Tue, Feb 09, 2016 at 08:24:30AM +0100, fhouwel...@email.it wrote: > Thanks, Ben. > I guess the difference lies in the interpretation of the asterisk: replace > current file only if it is unnamed, otherwise create a new unnamed file. > Regards > frans > > - Messaggio originale - > Da: "Ben Pfaff" > A: "Frans Houweling" > Cc: pspp-users@gnu.org > Inviato: Martedì, 9 febbraio 2016 5:26:46 > Oggetto: Re: DATASET behaviour > > On Sat, Jan 30, 2016 at 07:46:15PM +0100, Frans Houweling wrote: > > I would like to signal a difference with respect to SPSS. The following > > script works in SPSS but not in PSPP: > > > > DATA LIST LIST /area (F1.0) price (F12.0). > > BEGIN DATA > > 41805 > > 11945 > > 41412 > > END DATA. > > DATASET COPY WORK_A. > > DATASET ACTIVATE WORK_A. > > AGGREGATE OUTFILE = * /BREAK = area /price = MEAN(price). > > DATASET NAME OTHER_1. > > DATASET DISPLAY. > > DATASET ACTIVATE WORK_A. > > > > > > In SPSS: > > - after the DATASET COPY command I see 2 files: *Untitled[] (active) and > > *Untitled[WORK_A] > > - after next command (DATASET ACTIVATE) I see *Untitled[WORK_A] (active) > > - after AGGREGATE I see *Untitled[WORK_A] and *Untitled[] (active) > > - after DATASET NAME I see *Untitled[WORK_A] and *Untitled[OTHER_1] (active) > > while PSPP has only 1 file left at this point. > > I tried PSPPIRE to follow the steps, but it I guess it doesn't honor the > > DATASET COPY command. > > I want to let you know that I've confirmed the bug and plan to fix it. > DATASET COPY should work, and it has some tests in the testsuite, so I'm > curious about what's wrong. ___ Pspp-users mailing list Pspp-users@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-users
Re: dataset experiments
Experiment #1 - Start up SPSS. Then, before you define any variables or open any data files, Run a DATASET NAME command, like this: DATASET NAME myfile. Does SPSS accept this or give an error and, if it gives an error, what is it? SPSS 14 accepts this and displays "Untitled1 [myfile]" in the data editor. Experiment #2 - Start up SPSS. Then, before you do anything else, run a syntax file like this: GET 'file1.sav'. DATASET NAME file1. DATASET DISPLAY. GET 'file2.sav'. DATASET DISPLAY. GET 'aggr7.sav'. DATASET NAME file1. DATASET display. Dataset Display Datasets | | | file1(a) | | | a Active dataset GET 'aggr8.sav'. DATASET DISPLAY. Dataset Display Datasets | | | file1| | | | (unnamed)(a) | | | a Active dataset Regards frans ___ Pspp-users mailing list Pspp-users@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-users
Re: dataset experiments
On Sun, Feb 21, 2016 at 10:47:16PM +0100, Frans Houweling wrote: > >Experiment #1 - Start up SPSS. Then, before you define any > >variables or open any data files, Run a DATASET NAME command, like this: > >DATASET NAME myfile. Does SPSS accept this or give an error and, if it > >gives an error, what is it? > SPSS 14 accepts this and displays "Untitled1 [myfile]" in the data editor. OK, I did not expect that. I had the impression that a dataset had to have some content before it really existed and could be named. > >Experiment #2 - Start up SPSS. Then, before you do anything > >else, run a syntax file like this: > >GET 'file1.sav'. > >DATASET NAME file1. > >DATASET DISPLAY. > >GET 'file2.sav'. > >DATASET DISPLAY. > > GET 'aggr7.sav'. > DATASET NAME file1. > DATASET display. > > Dataset Display > > Datasets > | | > | file1(a) | > | | > a Active dataset > > GET 'aggr8.sav'. > DATASET DISPLAY. > > Dataset Display > > Datasets > | | > | file1| > | | > | (unnamed)(a) | > | | > a Active dataset OK, experiment #2 indicates that doing a GET creates a new unnamed dataset, instead of replacing the current dataset. The documentation sort of implies that, but it is not very clear. How about experiment #3, then, to clarify what happens to an empty dataset when GET executes, like this: Experiment #3 - Start up SPSS. Then, before you do anything else, run a syntax file like this: DATASET NAME file1. GET 'file1.sav'. DATASET DISPLAY. Thanks again! ___ Pspp-users mailing list Pspp-users@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-users
Re: dataset experiments
DATASET NAME file1. GET 'aggr7.sav'. DATASET DISPLAY. Dataset Display Datasets | | | (unnamed)(a) | | | a Active dataset - Messaggio originale - Da: "Ben Pfaff" A: "Frans Houweling" Cc: pspp-users@gnu.org Inviato: Lunedì, 22 febbraio 2016 2:05:34 Oggetto: Re: dataset experiments On Sun, Feb 21, 2016 at 10:47:16PM +0100, Frans Houweling wrote: > >Experiment #1 - Start up SPSS. Then, before you define any > >variables or open any data files, Run a DATASET NAME command, like this: > >DATASET NAME myfile. Does SPSS accept this or give an error and, if it > >gives an error, what is it? > SPSS 14 accepts this and displays "Untitled1 [myfile]" in the data editor. OK, I did not expect that. I had the impression that a dataset had to have some content before it really existed and could be named. > >Experiment #2 - Start up SPSS. Then, before you do anything > >else, run a syntax file like this: > >GET 'file1.sav'. > >DATASET NAME file1. > >DATASET DISPLAY. > >GET 'file2.sav'. > >DATASET DISPLAY. > > GET 'aggr7.sav'. > DATASET NAME file1. > DATASET display. > > Dataset Display > > Datasets > | | > | file1(a) | > | | > a Active dataset > > GET 'aggr8.sav'. > DATASET DISPLAY. > > Dataset Display > > Datasets > | | > | file1| > | | > | (unnamed)(a) | > | | > a Active dataset OK, experiment #2 indicates that doing a GET creates a new unnamed dataset, instead of replacing the current dataset. The documentation sort of implies that, but it is not very clear. How about experiment #3, then, to clarify what happens to an empty dataset when GET executes, like this: Experiment #3 - Start up SPSS. Then, before you do anything else, run a syntax file like this: DATASET NAME file1. GET 'file1.sav'. DATASET DISPLAY. Thanks again! ___ Pspp-users mailing list Pspp-users@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-users