Dear R users
I tried a lot to solve the following problem but could not. I have two arrays 
having same order i.e 1 by 150. 

j=10; ss=150; r=array(0 , c( j , ss )); rr=array(0 , c( j , ss )); r1=array(0 , 
c( j-1 , ss )); r2=array(0 , c( j-1 , ss )); 
r3=array(0 , c( 2 , ss ))

for(i in 1:j-1){
                        r1[ i , ] <- r[ j+1, ]-r[ j, ]; r2[ i , ] <- rr[ j+1, 
]-rr[ j, ]
                    }

Now i want to "rbind" the results of r1 and r2 for each time. Now the order  of 
r3[ j, ] will become 2 by 150. I used the following form in the loop 

r3[ i,]=rbind(r1[ i, ], r2[ i, ])              

But there is an error message 

Error in r3[i, ] = rbind(r1[i, ], r2[i, ]) :  number of items to replace is not 
a multiple of replacement length


I am looking for some suggestion to solve the problem. Thanks and


best regards

Muhammad Azam 
Ph.D. Student 
Department of Medical Statistics, 
Informatics and Health Economics 
University of Innsbruck, Austria 


      
        [[alternative HTML version deleted]]

______________________________________________
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