Description Usage Arguments Value Author(s) Examples
Create all combinations of vectors especially for matrices.
1 | comb.matrix(x, y)
|
x |
A vector. |
y |
A vector. |
A matrix with nrow(x)*nrow(y) rows and ncol(x)+ncol(y) columns.
Wei Xiao, Yin Jin, Darong Lai, Xinyi Yang, Yuanhua Liu, Christine Nardini
1 2 3 4 5 6 7 8 | ###A matrix with only one row is obtained####
x<-c(1,2,3)
y<-c(4,5)
comb.matrix(x,y)
###A matrix with 2 rows and 4 columns is obtained####
x<-matrix(x,1,)
y<-matrix(y,,1)
comb.matrix(x,y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.