如何在不创建列表的情况下将base-R中已删除的文件转换为单独的列?

如何在不创建列表的情况下将base-R中已删除的文件转换为单独的列?,r,string,parsing,R,String,Parsing,我目前使用以下代码执行此操作: write(unlist(fieldList),"c:/temp/test.txt") temp1<-cbind(fieldList,read.delim("c:/temp/test.txt",sep=" ",header=FALSE)) fieldList看起来像什么?您可以使用dputheadfieldList或类似工具将其添加到问题中吗?@Englshbob什么是fieldList?你的文件看起来像什么?您是否尝试过将sep参数设置为问题中的任何分

我目前使用以下代码执行此操作:

write(unlist(fieldList),"c:/temp/test.txt")
temp1<-cbind(fieldList,read.delim("c:/temp/test.txt",sep=" ",header=FALSE)) 

fieldList看起来像什么?您可以使用dputheadfieldList或类似工具将其添加到问题中吗?@Englshbob什么是fieldList?你的文件看起来像什么?您是否尝试过将sep参数设置为问题中的任何分隔符(看起来像“”)的read.csv?您能否提供正在使用的可复制的示例数据和代码?这是在你发帖时可以预料到的,并能带来快速、准确的回复。
NewColumn <- substr(temp1[,5],1,1)