我读这样的一个文本文件中的R 2.10.0阅读文本文件,并将其转换为字符对象
248585_at 250887_at 245638_s_at AFFX-BioC-5_at
248585_at 250887_at 264488_s_at 245638_s_at AFFX-BioC-5_at AFFX-BioC-3_at AFFX-BioDn-5_at
248585_at 250887_at
使用命令 集群< -read.delim(“测试” 9月=“\ t”的,填充= TRUE,标题= FALSE)
现在,我必须传递到每行中的该文件的Bioconductor的函数,它仅字符向量作为输入。 我的问题是,使用“as.character”这个“集群”对象上的一切都变成数字字符串。
> clusters[1,]
V1 V2 V3 V4 V5 V6 V7
1 248585_at 250887_at 245638_s_at AFFX-BioC-5_at
但
> as.character(clusters[1,])
[1] "1" "1" "2" "3" "1" "1" "1"
有什么办法保持原来的名字,并把它们变成一个字符向量?
也许它可以帮助:通过“read.delim”文件给我的“集群”对象属于“列表”类型。
非常感谢:-)
费德里科