用Rstudio对大文件数据按某列排序

signature <- read.delim("D:/project/gaea/signature", header=FALSE)%读取数据

关于read.delim()函数:delim的含义:A delimited text file is one in which each line of text is a record, and the fields are separated by a known character.也就是说一个delimited text file 就是每行为一个记录,每个fields由某字符分割。详细含义详见:read.delim & write.table

查看signature的数据类型

mode(signature)
-[1] "list"

按照signature的某一列排序

t = signature[order(signature$V3),]

输出排序结果

 write.table(t,'D:/project/gaea/signature.out',quote = FALSE, sep = '\t', row.names = FALSE)

你可能感兴趣的:(用Rstudio对大文件数据按某列排序)