Skip to content
Back to formatted view

Raw Message

Message-ID: <43956360.2080907@7d4.com>
Date: 2005-12-06T10:09:36Z
From: vincent@7d4.com
Subject: how to get or store the intermediate v?lues while running a	function
In-Reply-To: <20051206095014.27823.qmail@web33808.mail.mud.yahoo.com>

shanmuha boopathy a ??crit :

>   a<-function(a,b,c,d)
>   {
>   k=a+b
>   l=c+d
>   m=k+l
>   }
>    
>   in this example the function will return only the value of "m"
>   ...But I like to extract the values of "l" & "k" also.........
>   which command to use for storing or for extracting those intermediate value.......

may I suggest, inside your function

res = c(k, l, m);
return(res);
# also ... read some intro docs !