[R] Iterative data.frame

Carlos Ortega carlos.ortega at minorplanet.com
Tue Sep 24 16:04:30 CEST 2002


Hello,

You can use the following, based on rbind(), as a possible idea.

x.fin<-0
for (i in 1:10) {
	x.tmp<-rnorm(10)
	x.fin<-rbind(x.fin,x.tmp)
	}

Regards,
Carlos.

-----Mensaje original-----
De: owner-r-help at stat.math.ethz.ch
[mailto:owner-r-help at stat.math.ethz.ch]En nombre de Nolwenn Le Meur
Enviado el: martes, 24 de septiembre de 2002 14:28
Para: R-help at stat.math.ethz.ch
Asunto: [R] Iterative data.frame


Hi,
I would like to create data.frame and increment their name to finally merge
them.
Does anybody has a solution ?

Something like that ?

n<-6
for (i in 1:n) {
      m[i]<-data.frame(name,value)
	m<-merge(m[i]:m[n])
}


Nolwenn
********************************************
Nolwenn Le Meur
INSERM U533
Faculté de médecine
1, rue Gaston Veil
44035 Nantes Cedex 1
France

Tel: (+33)-2-40-41-29-86 (office)
     (+33)-2-40-41-28-44 (secretary)
Fax: (+33)-2-40-41-29-50
mail: nolwenn.lemeur at nantes.inserm.fr
********************************************

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


_____
The information in this email is confidential and it may not be
disclosed or used by anyone other than the addressee. If you are not the
intended recipient, any disclosure, copying, distribution or any action taken or
omitted is prohibited and may be unlawful.
Minorplanet cannot accept responsibility for the accuracy or completeness of
this email as it has been transmitted over a public network. If you suspect
that the email may have been amended, please call the sender.


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list