Skip to content
Prev 44117 / 398502 Next

Porting let* from Common LISP to R

Just creating variables with assignments is essentialy the same as
let*.  If you need to limit the scope of the variables to part of a
function you can use local(); just remember to use <<- if you want to
change the value of a variable outside the local().

Most Comman Lisp systems have higher default stack limits than R; when
I do lisp-style things I bump up the R stack limit
(options(expressions)) to 1000 or 2000.  Don't go too high or you may
overflow the C stack, which will cause a segmentation fault.  If your
C stack setting is too low, as it is by default in Mac OS X you may
need to increase that at the OS level.  R's lazy evaluation of
arguments also causes different stack usage patterns in recursive
code; sometimes more stack is needed, sometimes less--depends on the
code.

Hope that helps.

luke
On Thu, 12 Feb 2004, Gabriel Baud-Bovy wrote: