[R] Is it possible to recursively update a function?
Seeker
zhongming at gmail.com
Thu Mar 4 20:37:23 CET 2010
I need to update posterior dist function upon the coming results and
find the posterior mean each time.
On Mar 4, 1:31 pm, jim holtman <jholt... at gmail.com> wrote:
> What exactly are you trying to do? 'foo' calls 'foo' calls 'foo' ....
> How did you expect it to stop the recursive calls?
>
>
>
>
>
> On Thu, Mar 4, 2010 at 2:08 PM, Seeker <zhongm... at gmail.com> wrote:
> > Here is the test code.
>
> > foo<-function(x) exp(-x)
> > for (i in 1:5)
> > {
> > foo<-function(x) foo(x)*x
> > foo(2)
> > }
>
> > The error is "evalution nested too deeply". I tried Recall() but it
> > didn't work either. Thanks a lot for your input.
>
> > ______________________________________________
> > R-h... at r-project.org mailing list
> >https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> --
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
>
> What is the problem that you are trying to solve?
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.- Hide quoted text -
>
> - Show quoted text -
More information about the R-help
mailing list