From one column to two columns with different variablenames

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

mvanhooff
Posts: 1
Joined: Sat Apr 30, 2016 12:28 pm

From one column to two columns with different variablenames

Postby mvanhooff » Sun May 01, 2016 5:11 pm

Hi all,


SPSS VERSION 23


I have a question, and i'll simplify it as much as possible for better understanding.
Suppose that I have data concerning resting heartrate. The first column is the type of subject (0=normal, 1=athlete) and the 2nd column is the resting heartrate.

Columnname 1: TYPE_SUBJECT
Columnname 2: HEARTRATE

0 60
0 61
0 63
0 64
0 59
0 60
1 40
1 41
1 42
1 41
1 40

Now I would like a SPSS SYNTAX that does the following:

Creating 2 Columnnames: HEARTRATE_NORMAL & HEARTRATE_ATHLETE

So that I create something like

60 40
61 41
63 42
64 41
59 40
60 .



I hope somebody can help me! :)

Greetings,

Martijn

Who is online

Users browsing this forum: No registered users and 2 guests

cron