[R] contextstack overflow

2007-02-20 Thread Steven Finch
Hello! I written several implementations in R of Rémy's algorithm for generating random ordered strictly binary trees on 2n+1 vertices. One implementation involves manufacturing character strings like: X - list(0,list(0,0)) for the case n=2. If I perform the following two steps: cmd - X -

Re: [R] random binary trees in R

2006-11-30 Thread Steven Finch
packages, but nothing apparently can take my lists as input. If anyone has solved this problem and can send me the relevant code, I will be very thankful! Please e-mail me at the below address. With much appreciation, Steve Finch [EMAIL PROTECTED] From: Uwe Ligges [EMAIL PROTECTED] To: Steven Finch

[R] random binary trees in R

2006-11-29 Thread Steven Finch
Hello! I wish to generate random binary trees in R. Unfortunately recursive code like: t - function(p) { list(ifelse(runif(1)p,t(p),0), ifelse(runif(1)p,t(p),0)) } does not seem to work. Has anyone ever performed such a simulation? I would like to see their code. Maybe this is not