Thank you so much for your help. It was successful to combine matrix and
vector by using "rbind" as follows.
> a<-matrix(seq(1:10),nrow=2,ncol=5,byrow=TRUE)
> a
[,1] [,2] [,3] [,4] [,5]
[1,]12345
[2,]6789 10
> b<-t(c(11,12,13,14,15))
> b
[,1] [,2]
Hi!
Take a look at rbind()
Btw, I don't think you have to transpose b.
HTH,
Ivan
Le 9/16/2010 11:09, Wonsang You a écrit :
> Dear fellows,
>
> I am a novice in R. I would like to combine a matrix and a vector. Assume
> that we have the matrix a and the vector b with same length of column.
>
>
2 matches
Mail list logo