pspp-dev
[Top][All Lists]
Advanced

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

Re: Charts


From: John Darrington
Subject: Re: Charts
Date: Mon, 6 Dec 2004 18:57:28 +0800
User-agent: Mutt/1.5.4i

On Sun, Dec 05, 2004 at 01:20:27PM -0800, Ben Pfaff wrote:

     Now I get a different problem.  With this source file:
     
         DATA LIST FIXED 
                 FILE='cvs-hist'
                 /RTYPE 1-1 (A)
                 WHEND 3-12 (SDATE)
                 WHENT 14-18 (TIME)
                 WHO 26-33 (A)
                 WHAT 40-70 (A)
                 .
     
         VALUE LABELS /RTYPE 'A' 'Added' 'M' 'Modified' 'R' 'Removed'.
         VARIABLE LABEL WHAT 'Filename'.
         VARIABLE LABEL WHO 'Developer'.
         VARIABLE LABEL WHEND 'Date'.
         SPLIT FILE BY WHO.
         FREQUENCIES /RTYPE.
         SPLIT FILE OFF.
         COMPUTE T= 86400 * XDATE.JDAY(WHEND).
     
         COMPUTE WHAT=RTRIM(WHAT).
     
     
         SORT CASES BY WHAT, T (D).
         SPLIT FILE BY WHAT.
     
         * Number of days between file modification
         COMPUTE DIFF = LAG(T) - T.
         COMPUTE DIFF = DIFF / 3600 / 24.
     
         VARIABLE LABEL DIFF 'Time between modification'.
     
         LIST.
         EXAMINE DIFF 
                 /STATISTICS = DESCRIPTIVES
                 /PLOT = NPPLOT
                 .
     
     I get a segfault:
     
         (gdb) r
     
         Program received signal SIGSEGV, Segmentation fault.
         metrics_postcalc (m=0x810c8a8) at factor_stats.c:190
         190       m->trimmed_mean += (m->n - m->wvp[k2 - 1]->cc - tc) * 
m->wvp[k2]->v.f ;



1.  So I haven't properly handled the case where k2 is zero.  I'll
    fix  this.  Thanks for reporting it.

2.  But your input file is faulty.  I wouldn't expect it to do
    anything sensible.  Between the LIST and EXAMINE commands you need
    to put the lines:
    
    SPLIT FILE OFF.
    SELECT IF (DIFF > 0).


Does it work properly if you do that?


J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://wwwkeys.pgp.net or any PGP keyserver for public key.


Attachment: pgpmbhUikrFz5.pgp
Description: PGP signature


reply via email to

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