[R] as.function parameters

David Winsemius dwinsemius at comcast.net
Mon May 14 20:20:48 CEST 2012


On May 14, 2012, at 1:56 PM, jackl wrote:

> Hi,
>
> ~ well that seems to be a better solution.
> Question is how much an enviroment for each node costs in terms of
> save space..

Seems unlike that it would expand you space very much. Every function  
you create will have an environment.

>
> The example code is hard to present, because it is really based on  
> that
> problem. The frame of the problem is, that I have to write a program  
> that gives
> each node in a binomial tree a function with individual parameters..  
> in my
> case the current stock price at that node.
>
> I don't want to create these functions manually.. that would be too  
> much of an
> overload with a tree even of moderate size. But if I define these  
> functions
> via the as.function functionality it gives me the above problem.

You need to demonstrate what "tree" structure you propose to populate  
and then access. Since tree's are not an R data type, you should show  
us _exactly_ how you will create one, presumably using "lists". Once  
you have a small example it is very easy to present by using the  
output of the 'dput' function.


> --
> View this message in context: http://r.789695.n4.nabble.com/as-function-parameters-tp4620390p4629979.html
> Sent from the R help mailing list archive at Nabble.com.

You should also realize that you are probably limiting your audience  
severely by not posting context. Most people do not read Rhelp on  
Nabble.

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list