[R] merge_recurse in libray reshape - how does it work?

Bert Gunter gunter.berton at gene.com
Fri May 31 06:25:43 CEST 2013


Have you studied the Help file for Recall() . (It is not clear to me
that you have). Do you understand what recursion is? ( this is a
simple example of it).

Try constructing a very simple example and then work through what the
code does in it step by step.

I'll leave it to others to attempt a mini-tutorial beyond this.

-- Bert

On Thu, May 30, 2013 at 7:57 PM, Stephen Sefick <sas0025 at auburn.edu> wrote:
> merge_recurse
> function (dfs, ...)
> {
>     if (length(dfs) == 2) {
>         merge(dfs[[1]], dfs[[2]], all = TRUE, sort = FALSE, ...)
>     }
>     else {
>         merge(dfs[[1]], Recall(dfs[-1]), all = TRUE, sort = FALSE,
>             ...)
>     }
> }
>
> I do not understand how the Recall part of this function works.  Could
> somebody explain this to me?
> many thanks,
>
>
> --
> Stephen Sefick
> **************************************************
> Auburn University
> Biological Sciences
> 331 Funchess Hall
> Auburn, Alabama
> 36849
> **************************************************
> sas0025 at auburn.edu
> http://www.auburn.edu/~sas0025
> **************************************************
>
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods.  We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
>                                 -K. Mullis
>
> "A big computer, a complex algorithm and a long time does not equal
> science."
>
>                               -Robert Gentleman
>
> ______________________________________________
> R-help at 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.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm



More information about the R-help mailing list