Computing and using commands for rows

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

Computing and using commands for rows

GaborPasztor
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Computing and using commands for rows

Bruce Weaver
Administrator
Hello Gabor.  First, the VARIABLE LABELS command does not change the variable name.  It only assigns a descriptive label to the variable.  So it's not clear to me if you actually want to rename variables, or just assign variable labels that indicate the presence of at least one case with a value of 98.  

It would help list members if you provided a small example that shows what the data looks like now, and what you want it to look like afterwards.  

HTH.


GaborPasztor wrote
Hello,

I'm new here, hope my topic is at the good section.

I have a little problem by using syntax. I have a dataset, what contains several variables. Some of them are filled with only value 98, and sysmiss (and none of others has value 98). I would like to write a code what makes the following:

- if a variable contains '98' in any cases, the code rename the variable (with var lab or something  similar).
- if a variable doesn't contains '98' in any cases, the code doesn't make anything with its variable name.

I tried with computeing an constans and aggregate my data to make "row-based" solution, but I can't figured out how it could help for me yet.

If it's possible, I prefer ways to solve it, what works without flipping/restructure my dataset, and save my original dataset to a new one (such as xsave).

I don't know is there any solution :/

Thanks in advance,
Gabor
--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Computing and using commands for rows

GaborPasztor
Hello Bruce,

You have right, I updated my original post, thank you for your advice!

Regards,
Gabor
Reply | Threaded
Open this post in threaded view
|

Re: Computing and using commands for rows

Bruce Weaver
Administrator
Those not reading via Nabble can view the edited version of Gabor's original post here:

http://spssx-discussion.1045642.n5.nabble.com/Computing-and-using-commands-for-rows-td5727136.html


GaborPasztor wrote
Hello Bruce,

You have right, I updated my original post, thank you for your advice!

Regards,
Gabor
--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Computing and using commands for rows

PRogman
In reply to this post by GaborPasztor
I don't understand what you are trying to get. Please clarify example output related to your example data. Why the opposition to restructuring your data (it may be more efficient)? What if output is a new dataset?

/PR