pspp-users
[Top][All Lists]
Advanced

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

Re: String variables combining files


From: Alan Mead
Subject: Re: String variables combining files
Date: Thu, 26 Mar 2015 07:57:10 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

I see. I wasn't thinking about a table join where a string variable
wouldn't be affected.  (Are we 100% certain that the string variable
wouldn't ever be affected? I don't commonly use table joins...)

I think it would be helpful for the programmers to have some short
syntax examples that illustrate what we're expecting.  As an example, of
a short syntax example, this is from the SPSS manual for vector (I
believe there are examples in the PSPP manual as well):

* Replace a case's missing values with the mean of all
  nonmissing values for that case.

DATA LIST FREE /V1 V2 V3 V4 V5 V6 V7 V8.
MISSING VALUES V1 TO V8 (99).
COMPUTE MEANSUB=MEAN(V1 TO V8).

VECTOR V=V1 TO V8.
LOOP #I=1 TO 8.
+  DO IF MISSING (V(#I)).
+  COMPUTE V(#I)=MEANSUB.
+  END IF.
END LOOP.

BEGIN DATA
1 99 2 3 5 6 7  8
2  3 4 5 6 7 8  9
2  3 5 5 6 7 8 99
END DATA.
LIST.

-Alan

On 3/26/2015 7:47 AM, Frans Houweling wrote:
> OK maybe I confuse width and content.
> In the case of numeric variables, if I MATCH with a table file, and
> both files have a var TURNOVER, I know my current TURNOVER var will be
> left alone. The question whether the TURNOVER column in the table file
> may have better data than the one in my workfile is a different matter
> and of no interest to me here. In this case, with string variables, I
> would prefer to retain just my original variable width.
> But I agree that with UPDATE in the case of strings the resulting
> string width could (should?) be set to the maximum width.
> Friends :-)?
> frans 

-- 

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

science + technology = better workers

+815.588.3846 (Office)
+267.334.4143 (Mobile)

http://www.alanmead.org

Announcing the Journal of Computerized Adaptive Testing (JCAT), a
peer-reviewed electronic journal designed to advance the science and
practice of computerized adaptive testing: http://www.iacat.org/jcat




reply via email to

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