天天看點

R讀 txt 檔案

house<-read.table("house_data.txt", header = TRUE, sep='|',fileEncoding ='UTF-8')      
id|house_customized_id|community_id|community_name|house_area|house_structure|house_floor|house_total|house_avg|house_tag|agency_name      
6328500962692431872|3232_77_3室2廳_5.5|3232|尚東花園|77.0|3室2廳|5.5|285.0|37013.0|南北通透|利衆置業      
6328500979813580800|1213_93_2室2廳_9.11|1213|賽世香樟園|93.0|2室2廳|9.11|265.0|28495.0|南北通透|蘇商房産仙林店      
header = TRUE:表示第一行為列變量名      
sep='|':見名知義,分隔符      
fileEncoding ='UTF-8':解決中文亂碼