View source: R/jj_match_matrices.R
jj_match_matrices | R Documentation |
return the subset of two matrices that shares the same rownames, colnames or both.
jj_match_matrices(
mat_a,
mat_b,
match_by = c("all", "columns", "rows")[1],
print_only = FALSE,
verbose = T
)
mat_a |
matrix 1 |
mat_b |
matrix 2 |
match_by |
match by |
print_only |
only print out whether rownames or colnames are identical between two matrices |
verbose |
rownames to set |
Returns a list with the matched features/samples in the same order
matrix1 = matrix(1:80, nrow = 8, dimnames = list(paste0('gene_',1:8), paste0('cell_', 1:10)))
matrix2 = matrix(1:50, nrow = 5, dimnames = list(paste0('gene_',c(1,4,8,2,3)), paste0('cell_', c(2:5, 8:13))))
jj_match_matrices(matrix1, matrix2, print_only = T)
jj_match_matrices(matrix1, matrix2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.