工作,我有一個文本文件,我試圖變成一個data.frame爲什麼我的分離器停在函數read.table
下面是摘錄
<li>
<a title="Data table: Grand Falls-Windsor (Census Agglomeration), Newfoundland and Labrador" href="../../details/page.cfm?Lang=E&Geo1=CMA&Code1=010&Geo2=PR&Code2=01&Data=Count&SearchText=Grand%20Falls-Windsor&SearchType=Begins&SearchPR=01&B1=All&GeoLevel=PR&GeoCode=010&TABID=1">Grand Falls-Windsor (<acronym title="Census Agglomeration">CA</acronym>)</a> [<a href="../../details/page_Map_Carte_Detail.cfm?Lang=E&G=1&Geo1=CMA&Code1=010&Geo2=PR&Code2=01&Data=Count&SearchText=&SearchType=Begins&SearchPR=01&B1=All&Custom=&TABID=1&geocode=010" title="Map: Grand Falls-Windsor (Census Agglomeration), Newfoundland and Labrador">map</a>]
</li>
<li>
<a title="Data table: St. John's (Census Metropolitan Area), Newfoundland and Labrador" href="../../details/page.cfm?Lang=E&Geo1=CMA&Code1=001&Geo2=PR&Code2=01&Data=Count&SearchText=St.%20John's&SearchType=Begins&SearchPR=01&B1=All&GeoLevel=PR&GeoCode=001&TABID=1">St. John's (<acronym title="Census Metropolitan Area">CMA</acronym>)</a> [<a href="../../details/page_Map_Carte_Detail.cfm?Lang=E&G=1&Geo1=CMA&Code1=001&Geo2=PR&Code2=01&Data=Count&SearchText=&SearchType=Begins&SearchPR=01&B1=All&Custom=&TABID=1&geocode=001" title="Map: St. John's (Census Metropolitan Area), Newfoundland and Labrador">map</a>]
</li>
df <- read.table("myFile.txt",sep="\n")
這個(MYFILE.TXT)在Grand Falls提取物的末端工作,但是\n
似乎不起作用。這裏有一排控制檯讀數,你可以看到末尾有\n
s,但沒有生效。
\t\t\t\t\t\t<a title=Data table: St. John's (Census Metropolitan Area), Newfoundland and Labrador href=../../details/page.cfm?Lang=E&Geo1=CMA&Code1=001&Geo2=PR&Code2=01&Data=Count&SearchText=St.%20John's&SearchType=Begins&SearchPR=01&B1=All&GeoLevel=PR&GeoCode=001&TABID=1>St. Johns (<acronym title="Census Metropolitan Area">CMA</acronym>)</a> [<a href="../../details/page_Map_Carte_Detail.cfm?Lang=E&G=1&Geo1=CMA&Code1=001&Geo2=PR&Code2=01&Data=Count&SearchText=&SearchType=Begins&SearchPR=01&B1=All&Custom=&TABID=1&geocode=001" title="Map: St. Johns (Census Metropolitan Area), Newfoundland and Labrador>map</a>]\n\t\t\t\t\t\n </li>\n\t\t\t \n
道歉此演示文稿,但我有很多的麻煩Rstudio試圖從控制檯
複製有人可以幫助在這裏的時候崩潰。反正read.table()
不正確?
發送更正 – pssguy