On Wed, Feb 3, 2010 at 2:37 PM, Peng Yu <pengyu...@gmail.com> wrote:
> On Wed, Feb 3, 2010 at 12:29 PM, Steve Lianoglou
<snip>
>> Does `unlist(root, recursive=FALSE)` get you what you want?
...
> My example has only 2 levels.
>
> But my questions is not limited to a particular level. The
> nonrecursive version flatten the first level. But what if the tree is
> of n level and I want to flatten it to m levels (where m < n)?

I'm guessing you're going to have to write your own function for that
... using loops, or recursion.

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to