excel行列转置

library(tidyverse)
X<-read.csv(file = "data_RNA_Seq_v2_mRNA_median_Zscores.csv",sep = "\t",header =T,row.names=1)错误乱码,不明原因。
a<-read.table(file = "data_RNA_Seq_v2_mRNA_median_Zscores.txt",sep = "\t",header =T)数据框格式,可以用来转置
y<-t(a)
write.table(y,file = "data.txt",sep = ",",quote=F)全是乱码分隔符必须是\t
write.table(y,file = "data.txt",sep = "\t",quote=F)OK了

你可能感兴趣的:(excel行列转置)