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 -
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
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