Entering edit mode
22 months ago
nonaddldy
▴
10
The .txt output should occupies 4 lines (including header), however, each long line was seperated into several lines. So, how shold I do to avoid the long line seperation? fig1 is the output in Rstudio
fig2 is the .txt output opened by notepad++
the code is the following:
upgene_list<-list(rownames(DEG[DEG$change =='UP',]))
downgene_list<-list(rownames(DEG[DEG$change =='DOWN',]))
normalgene_list<-list(rownames(DEG[DEG$change =='NOT',]))
geneupdown_list<-rbind(upgene_list,downgene_list,normalgene_list)
write.table(cbind(rownames(geneupdown_list),geneupdown_list),paste0("./", my_id, "_geneupdown.txt"),sep="\t",row.names= F,col.names=T)
Minimise your example, and provide expected output. I'd guess before writing it out, you would need
paste(myVector, collapse = ",")
.