-----Original Message-----
From: arnaud Gaboury [mailto:arnaud.gaboury at gmail.com]
Sent: Monday, May 24, 2010 2:55 PM
To: r-help at r-project.org
Cc: 'arnaud Gaboury'
Subject: writing function:loop and rbind
Dear group,
I have a function, let's call it myfun, wich give me a list of result:
R1,R2,R3...
There is a loop in this function to get my results. Here is the
structure of
my function:
Myfun<-function()
{
For (i in X ){
-----------instructions---------
Ri
{
{
All Results (R1,R2...) are Data.frame. As a final result (call it
"Final"),
I need to rbind all these dataframe. One solution could be to create
another
loop, but I think I can avoid it. How can I add a line like this :
Final<-rbind(R1,R2...) using the i parameter? Another solution could
may be
to create a list of all my results, then apply rbind to the list?
Any idea would be appreciated.
TY in advance