这是我在 R 中的问题:
mtable <- read.table(paste(".folder_1362704682.4574","/groups.txt",sep=""),sep="\t",comment.char='',skip=0, header=TRUE, fill=TRUE,check.names=FALSE)
第一个文件夹部分或 paste() 通常由 var 包装,用于调试目的 -> 静态。
我总是收到这样的信息:
Error in read.table(paste(".frunc_1362704682.4574", "/groups.txt", sep = ""), :
duplicate 'row.names' are not allowed
但是,如果我查看带有此标题的文件:
root_node_name node_name node_id #genes_in_root_node #genes_in_node #genes_with_variable=1_in_root_node #genes_with_variable=1_in_node raw_p_underrepresentation_of_variable=1 raw_p_overrepresentation_ of_variable=1 FWER_underrepresentation FWER_overrepresentation FDR_underrepresentation FDR_overrepresentation
我看不到任何重复项.. :( 我在另一个讨论中读到了我应该尝试的内容:
mtable <- read.table(paste(".frunc_1362704682.4574","/groups.txt",sep=""),sep="\t",comment.char='',skip=0, header=TRUE, fill=TRUE,check.names=FALSE,**row.names=NULL**)
这很好用,但之后所有标题都向右移动一列:
> head(mtable, n=1)
row.names root_node_name node_name
1 molecular_function trans-hexaprenyltranstransferase activity GO:0000010
node_id #genes_in_root_node #genes_in_node
1 17668 2 2419
#genes_with_variable=1_in_root_node #genes_with_variable=1_in_node
1 0 0.74491
raw_p_underrepresentation_of_variable=1
1 1
raw_p_overrepresentation_of_variable=1 FWER_underrepresentation
1 1 1
FWER_overrepresentation FDR_underrepresentation FDR_overrepresentation
1
有什么想法可以让它正确吗?:(
编辑:
好的,正如评论者所说,这主要是 thr 行的问题.. 愚蠢的我认为它来自标题。但我不想命名这些行,它应该很容易阅读它们...... oO不能那么难,或者?
文件内容:
molecular_function trans-hexaprenyltranstransferase activity GO:0000010 17668 2 2419 0 0.74491 1 1 1 -1 -1
molecular_function single-stranded DNA specific endodeoxyribonuclease activity GO:0000014 17668 5 2419 0 0.478885 1 1 1 -1 -1
molecular_function lactase activity GO:0000016 17668 1 2419 0 0.863086 1 1 1 -1 -1
molecular_function alpha-1,3-mannosyltransferase activity GO:0000033 17668 3 2419 0 0.64291 1 1 1 -1 -1
molecular_function tRNA binding GO:0000049 17668 27 2419 7 0.975698 0.0663832 1 1 -1 -1
molecular_function fatty-acyl-CoA binding GO:0000062 17668 20 2419 6 0.986407 0.0460431 1 1 -1 -1
molecular_function L-ornithine transmembrane transporter activity GO:0000064 17668 1 2419 0 0.863086 1 1 1 -1 -1
molecular_function S-adenosylmethionine transmembrane transporter activity GO:0000095 17668 1 2419 0 0.863086 1 1 1 -1 -1