Re: [Q:] A couple of questions


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

Re: [Q:] A couple of questions



On Tue, 16 Jun 1998 00:50:41 -0400, Ray Kremer <raykremer@HOTMAIL.COM>
wrote:

>>Say I have two columns of data in a data variable I have called
>>'stats'
>>1,  30
>>2, 2.25
>>4, 3.65
>>1, 9.95
>>Is it possible, from the home screen, to perform a cumsum on the
>>product of each of the values in the data editor?
>>ie
>>(1*30) + (2*2.25) + (4*3.65) + (1*9.95)
>>If so, what would be the syntax I would use?
>
>There is no short command for this.  No doubt you could write out some
>long thing to do this, but that defeats the purpose.

With a little experimentation, using what you said below, I have found
that the following works:

cumsum(build[1]*build[2])

where 'build' is the name of the list and '1' and '2' are the columns.

Using the above example, 'cumsum(build[1]*build[2])' on the home
screen provides 59.05 as the result.

>>Also, is it possible to directly access a value in a particular cell?
>>IE, to include the value in row 3, column 2 in a calculation I am
>>performing on the home screen?
>
>listname[2,3]

Thank you for this. See above.

Midnight.


References: