How to fill in a number within a column?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to fill in a number within a column?

Bill Wu

How to change File A to File B either by syntax or pull down menu?

 

File A

 

Id            v1           shift

1              30           1

2              21           .

3              18           .

.               .               .              

.               .               .

.               .               .

12           35           1

1              13           2

2              29           .

3              18           .

.               .               .

.               .               .

.               .               .

12           27           .

 

File B

 

Id            v1           shift

1              30           1

2              21           1

3              18           1

.               .               1             

.               .               1

.               .               1

12           35           1

1              13           2

2              29           2

3              18           2

.               .               2

.               .               2

.               .               2

12           27           2

 

 

Thanks,

 

Bill

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How to fill in a number within a column?

Maguin, Eugene

If (sysmis(shift) and not(sysmis(lag(shift)))) shift=lag(shift).

 

Gene Maguin

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Wu, Yow Wu
Sent: Wednesday, September 24, 2014 1:12 PM
To: [hidden email]
Subject: How to fill in a number within a column?

 

How to change File A to File B either by syntax or pull down menu?

 

File A

 

Id            v1           shift

1              30           1

2              21           .

3              18           .

.               .               .              

.               .               .

.               .               .

12           35           1

1              13           2

2              29           .

3              18           .

.               .               .

.               .               .

.               .               .

12           27           .

 

File B

 

Id            v1           shift

1              30           1

2              21           1

3              18           1

.               .               1             

.               .               1

.               .               1

12           35           1

1              13           2

2              29           2

3              18           2

.               .               2

.               .               2

.               .               2

12           27           2

 

 

Thanks,

 

Bill

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: How to fill in a number within a column?

Bruce Weaver
Administrator
In reply to this post by Bill Wu
Look up the following in the fine manual (FM):

  IF
  MISSING
  LAG

HTH.


Bill Wu wrote
How to change File A to File B either by syntax or pull down menu?

File A

Id            v1           shift
1              30           1
2              21           .
3              18           .
.               .               .
.               .               .
.               .               .
12           35           1
1              13           2
2              29           .
3              18           .
.               .               .
.               .               .
.               .               .
12           27           .

File B

Id            v1           shift
1              30           1
2              21           1
3              18           1
.               .               1
.               .               1
.               .               1
12           35           1
1              13           2
2              29           2
3              18           2
.               .               2
.               .               2
.               .               2
12           27           2


Thanks,

Bill

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).