I would like to combine two matrices with different row count:
k<-c(11,21,31,4,5,6,7,8,9)
k<-as.matrix(k)
m<-c(10,20,30,4,5,6)
m<-as.matrix(m)
I am using this command but doesnt work correctly for me:
j<-merge(m,k,all=TRUE)
what should I do to do this job
EDIT
I would like to have something like this:
   [,1]  [,2]
[1,] 11    10
[2,] 21    20 
[3,] 31    30
[4,] 4     4
[5,] 5     5
[6,] 6     6
[7,] 7     NA
[8,] 8     NA
[9,] 9     NA
 
     
     
     
    