Combines multiple SnpMatrix objects by rows, automatically handling differing SNP columns, optimized for large matrices.

rbindSnpFlexible(...)

Arguments

...

One or more SnpMatrix objects.

Value

A single SnpMatrix object with all rows combined.

Examples

m1 <- methods::new("SnpMatrix",
                   matrix(as.raw(1:3), nrow = 2, ncol = 3,
                          dimnames = list(c("S1", "S2"),
                                          c("SNP1", "SNP2", "SNP3"))))
m2 <- methods::new("SnpMatrix",
                   matrix(as.raw(1:3), nrow = 2, ncol = 2,
                          dimnames = list(c("S3", "S4"),
                                          c("SNP2", "SNP4"))))
#> Warning: data length [3] is not a sub-multiple or multiple of the number of rows [2]
rbindSnpFlexible(m1, m2)
#> A SnpMatrix with  4 rows and  4 columns
#> Row names:  S1 ... S4 
#> Col names:  SNP1 ... SNP4