pspp-users
[Top][All Lists]
Advanced

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

Re: your mail


From: Ben Pfaff
Subject: Re: your mail
Date: Mon, 12 Jun 2017 13:48:54 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

The COMPUTE command that you mention creates a single variable.  VECTOR
takes a collection of variables and turns them into an array.  You only
have a single variable here (or at least you have only mentioned one
variable), so VECTOR is not going to be useful.

Maybe you are trying to find out the difference in date from one case to
another?  If so, then you might really want the LAG function.

On Mon, Jun 12, 2017 at 01:05:28PM -0700, Braxton Alfred wrote:
> Using yhe commands 'COMPUTE Julian = XDATE.TDAY(date)' on the variable
> 'date' and then 'VECTOR days = julian' followed by 'COMPUTE
> days(2)-days(1)' I get the error 'no function or vector named days'  My goal
> is to have a variable (a vector) of days between events.  If you would deal
> with that it would be helpful.
> I have long given up on DATEDIFF since there is no apparent way to directly
> reference the output.  It does not work anyway.  If I could explain why it
> does not work I probably would not need any help.
> Marc
> 
> -----Original Message-----
> From: Ben Pfaff [mailto:address@hidden 
> Sent: June-12-17 11:15 AM
> To: Braxton Alfred
> Cc: address@hidden
> Subject: Re: your mail
> 
> On Mon, Jun 12, 2017 at 11:11:10AM -0700, Braxton Alfred wrote:
> > I am trying to do some analyses on medical lab tests which occur at 
> > varying times.  I need to have the number of days between tests.  
> > DATEDIFF, while described in the manual, does not work, but even if it 
> > did I need to be able to reference 'date(i) - date(i-k)'.  I created a 
> > variable 'julian' (the number of days since 1500 or so) using 
> > XDATE.TDAY(date) but cannot VECTORize it.
> > 
> > This is holding up the whole project and people stop talking and look 
> > at me strangely when I come near.
> 
> When you say "DATEDIFF does not work", what do you mean?  If you can explain
> why it doesn't work, then perhaps we can help.  In particular, if there is a
> bug in DATEDIFF, then I would like to fix it.
> 
> When you say that you cannot put your variable into a vector, what do you
> mean?  If there's a problem with the VECTOR implementation, then I would
> like to fix that too.
> 



reply via email to

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