Making data files compatible with SPSS

I’ve just spent the day trying to read SuperLab data output files into SPSS. I used Dataviewer to first merge the output of several participants - that’s a great feature! While I can read the resulting merged output file into Excel, save into .xls and then read it into SPSS from the .xls format, this is not preferred since I cannot then control the field sizes and end up with SPSS files that aren’t compatible with each other. With a few changes though, the text files can be read in. It would be great to incorporate these changes into the next version of SuperLab.

  1. In a text editor, I had to do a global change to remove all the quotation symbols.
    SPSS only allows a single text delimiter - in the output files, some text is delimited by quotes, and some isn’t.
    RECOMMENDATION: SuperLab should not put quotes around any of the text it spits out - the tab delimiters are enough.

  2. In a text editor, I did a ‘SAVE AS’ with the line feeds in UNIX format. SuperLab is generating Mac format line feeds - SPSS can’t understand them, so when I try to read in the text file, it generates thousands of variables.
    RECOMMENDATION: SuperLab on the mac should generate UNIX line feeds. SPSS and all Mac programs can handle them.

  1. SuperLab does not put quotes around any of the text it spits out. I checked all of my output files from running experiments on my own machine: none of them had double quotation marks, and none of them had single quotation marks that weren’t either in a name or that weren’t representing an actual key press. If you have extra quotation marks when you’re trying to load your file into SPSS, I’m inclined to believe it’s not SuperLab doing it.

find . -iregex ‘..txt$’ -print0 | xargs -0 grep ‘"’
find . -iregex '.
.txt$’ -print0 | xargs -0 grep “’”

  1. Unfortunately, I can’t easily write a command at my command prompt to verify this. All of the files I opened with TextWrangler were already Unix (LF) format. Again, if you’re seeing your files as Mac (CR) format, I’m inclined to believe it’s not SuperLab doing this.

Can you attach a few sample text files that represent what SuperLab is doing and what SPSS is instead expecting?

It’s Excel - sorry!

Hi Hank,
You are right - it seems to be Excel that is adding those quotes and changing the line feeds. I had opened the .txt file in Excel to revise the headers into a single line (since SPSS expects a single line of single word headers, like ‘trial_number’), and Excel had added those quote marks. I had then clicked Save and kept it as tab-delimited text. So Excel (I’m using Excel 2008) is the culprit, and I apologize for the confusion.

What I will do is save without headers from now on (found that in SuperLab Options - thank you for that!) and add variable names in SPSS, since SPSS can’t cope with the SuperLab headers.