8.10.14

Convert variable name list to comma separated variable names

This trick is quite useful for SPSS. Let say I have 50 variables that I want to sum up the values by using SUM(var1,var2, ...) in Transform > Compute variable..., converting the list:
var1
var2
...
var50
to
var1,var2,...,var50
then
SUM(var1,var2,...var50)
is quite tedious.

I found this nice command line from http://www.shellhacks.com/ (in Linux, of course). Save your list in a file, say temp_file, then
echo $(awk 'NR > 1{print line", "}{line=$0;}END{print $0" "}' temp_file) > new_file
Your comma separated variable names are ready in new_file. Thanks, penguin.

Installing SPSS 22 on Linux Mint

  1. My setup: Linux Mint LMDE 201403, wine-1.4.1, PlayOnLinux 4.2.1
  2. Install SPSS as usual from installation folder ("setup.exe") using Playonlinux. 32 bit installation.
  3. After installation is finished, make shortcuts for "stats.exe" (SPSS) and "law.exe" (Licence authorization wizard).
  4. Download "echoid.dat" from IBM website (http://www-01.ibm.com/support/docview.wss?uid=swg21613684). Copy to installation folder in Playonlinux virtual drive.
  5. Run Licence authorization wizard from Playonlinux. Then run SPSS.
  6. After running analysis, table in output cannot be displayed.
  7. Go to Edit > Options > Pivot Tables.
  8. "Render Legacy Tables".