Entering edit mode
11.4 years ago
robjohn7000
▴
110
I have multiple files to read and also do heatmap after which the outputs will be saved. Somehow, there is a problem(s) with my code below and I can't figure out why it is not working. Files: mxn.dat, scu.dat, emun.dat, ser.dat
files <- list.files(pattern=".dat")
for (i in length(files)){
data <-read.table(files[i],row.names=1,header=T,sep='\t')
for in length(files){
png('i.png')
pheatmap(t(data[i]), cellwidth = 32, cellheight = 14, fontsize = 5, show_colnames = T, cluster_cols = FALSE)
dev.off()
}
}
Any help will be appreciated to get the code working.
Thanks
Rob
Please also post what kind of error you are getting !!!!