我是R的新手。我正在尝试编写一堆数据帧,每个数据帧对xlsx文件都是一行,但它只写入文件中的两个单元格。非常感谢任何帮助!
files <- list.files(path="C:/Users/owner/Desktop/LONG_TABLE_DATA", pattern="*.xlsx", full.names=T, recursive=FALSE)
n=1
lapply(files, function(x) {tall =
read.table("94__U036-Pool00_trimmed_Sample1_S5_L001_R1_001_trimmed_Sample1_S5_L001_R2_001_500kb_SORT_norm.num.txt",
sep = "\t", dec = ".", stringsAsFactors = FALSE,
colClasses=c("NULL", "NULL", "NULL", "NULL", "NULL", "NULL", "NULL",
"NULL", "NULL", "numeric", "NULL", "NULL", "NULL", "NULL"))
tp=t(tall)
data.frame(tp)
write.table(tp,file = "stuff.txt", append = FALSE, col.names = FALSE,row.names = FALSE)