これまでのところ、各行に5つしかありませんが、まもなく20を超えるので、これを行うためのより良い方法を見つける必要があります。ループについて考えfor
ていましたが、名前(mt1、mt2など)の番号を反復処理する方法がわかりません。
mt1<- do.call(cbind, dataoutput[[1]])
mt2<- do.call(cbind, dataoutput[[2]])
mt3<- do.call(cbind, dataoutput[[3]])
mt4<- do.call(cbind, dataoutput[[4]])
mt5<- do.call(cbind, dataoutput[[5]])
rownames(mt1)[1:No.file]<-paste("file", 1:No.file, sep=" ")
rownames(mt2)[1:No.file]<-paste("file", 1:No.file, sep=" ")
rownames(mt3)[1:No.file]<-paste("file", 1:No.file, sep=" ")
rownames(mt4)[1:No.file]<-paste("file", 1:No.file, sep=" ")
rownames(mt5)[1:No.file]<-paste("file", 1:No.file, sep=" ")
library(reshape)
mt11<-melt(mt1, id.vars="Legend")
mt21<-melt(mt2, id.vars="Legend")
mt31<-melt(mt3, id.vars="Legend")
mt41<-melt(mt4, id.vars="Legend")
mt51<-melt(mt5, id.vars="Legend")