pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Create new variables from others (If Condistional or recode)


From: Alan Mead
Subject: Re: Create new variables from others (If Condistional or recode)
Date: Mon, 23 Oct 2017 12:03:20 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

And if John's explanation is insufficient, please explain what you are trying to do. A recode statement (if your conditions depend on values of one variable) or compute statements in IF or DO IF blocks (otherwise) may be necessary to accomplish what you want.

-Alan

On 10/23/2017 12:00 PM, John Darrington wrote:
In PSPP, the simplest way to create a new variable, and assign values
to it derived from existing variables is using the COMPUTE command.
For example if you have existing variables v1, v2 and v3, you could
create a new variable as follows:

compute newVar = v1 or v2 or v3.

(don't forget the . at the end)

J'

On Mon, Oct 23, 2017 at 01:12:03PM -0300, Betsab?? Cohen wrote:
     Hi everyone:
     I'm a recent user of PSPP and i'm trying to create a new variable from
     three other variables using a conditional. In Excel i would use IF and OR
     functions but i don't know what should i used in pspp sintaxys:
     
     The idea is to create a new variable as follows:
     
     
     NEW Variable "Condicion_Actividad"
     Existing variables
     Cod.1= Var5=1 or Var6=1 or Var7=1
     Cod.2= Var8=1
     Cod.3= Var8=2
     
     Thanks in advance.
     
     Betsy
     
     


_______________________________________________
Pspp-users mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/pspp-users

-- 

Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.

science + technology = better workers

http://www.alanmead.org

I've... seen things you people wouldn't believe...
functions on fire in a copy of Orion.
I watched C-Sharp glitter in the dark near a programmable gate.
All those moments will be lost in time, like Ruby... on... Rails... Time for Pi.

          --"The Register" user Alister, applying the famous 
            "Blade Runner" speech to software development

reply via email to

[Prev in Thread] Current Thread [Next in Thread]