[R] combining vectors to matrices or data frames

Jan Malte Wiener
Wed, 15 May 2002 14:27:30 -0000

hi,

during a for(i in 1:xx]) loop I always newly calculate a vector
(e.g. tmp<-c(a,b,c,d,e) )
now i need that vector to be attached at the bootom of a matrix (or
data.frame).


e.g.

m<-matrix()

for(i in 1:5]){
	#some calculations for a,b,c,d,e
	a<- ... b<- ... c<- .. ....

	tmp<-c(a,b,c,d,e)

	??? now I need to attach this tmp to the matrix m ???
}

i couldn't get rbind or append to work properly

thanks for advice,
jan