将多个相等尺寸矩阵与单个矩阵与每个单元格组合的单元格值是r的列表,作为r的输入矩阵的值
输入: 相同维度有三个输入矩阵 3输入矩阵:
GeneA GeneB
GeneA 31 4
GeneB 5 8
GeneA GeneB
GeneA 5 14
GeneB 5 8
GeneA GeneB
GeneA 30 14
GeneB 45 7
输出:
GeneA GeneB
GeneA {31,5,30} {4,14,14}
GeneB {5,5,45} {8,8,7}
一个具有单元格值的矩阵作为输入矩阵值的列表。
Input:
There are three input matrices of same dimensions
3 input matrices:
GeneA GeneB
GeneA 31 4
GeneB 5 8
GeneA GeneB
GeneA 5 14
GeneB 5 8
GeneA GeneB
GeneA 30 14
GeneB 45 7
output:
GeneA GeneB
GeneA {31,5,30} {4,14,14}
GeneB {5,5,45} {8,8,7}
one matrix with cell value as a list of the values from the input matrices.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用
mapply
,然后将结构和dimnames分配为matrix1
output的dimnames:
You can use
mapply
, and then assign the structure and dimnames as those frommatrix1
Output:
您需要将每个结果向量保存在矩阵中的列表中。如果您的矩阵被称为
M1
,M2
和m3
,那么您可以做:以便我们有
:
You would need to hold each resulting vector within a list in a matrix. If your matrices are called
m1
,m2
andm3
, then you can do:So that we have:
and