如何组合具有相同行数但列数不同的3个矩阵

时间:2016-12-07 06:00:21

标签: r matrix

我只是想把我的矩阵组合成一个.txt文件。我的代码一直收到错误消息:

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)

1 个答案:

答案 0 :(得分:0)

试一试:

<a href="otherPage.html" class="transition">LINK</a>

$(document).ready(function() {
    $("body").css("display", "none");

    $("body").fadeIn(2000);

    $("a.transition").click(function(event){
        event.preventDefault();
        linkLocation = this.href;
        $("body").fadeOut(1000, redirectPage);      
    });

    function redirectPage() {
        window.location = linkLocation;
    }
});