-1
我只是想将我的矩阵合并到一个.txt文件中。在如何将3个矩阵与行数相同但列数不同
dim(gcDatalmFit$coefficients)
dim(eBgcData$coefficients)
dim(eBgcData$p.value)
write.table(file="BLIMP1data.txt", cbind(gcDataGenes,gcDatalmFit$coefficients,eBgcData$coefficients,eBgcData$p.value), row.names=F, col.names=c("GeneID",colnames(gcDatalmFit$coefficients), colnames(eBgcData$p.value), paste("p",colnames(eBgcData$coefficients))), sep=",")
结果:
[1] 45101 4
[1] 45101 6
[1] 45101 6
number of rows of result is not a multiple of vector length (arg 1)
我强烈建议你做一个单一的数据第一个对象,然后保存在一个单独的步骤。这样您就可以查看数据并查看您面临的问题。 – alistaire
您没有提供可重复的示例,因此很难诊断;但是dim(gcDataGenes)或者length(gcDataGenes)'是什么? –
您可以使用'rowr'中的'cbind.fill' – akrun