Total Pageviews

Showing posts with label R. Show all posts
Showing posts with label R. Show all posts

2019/07/13

[R 語言] Import CSV 出現亂碼

Problem
import 語法
pop <- read.csv("F:/opendata106N0101.csv", header=TRUE)

資料顯示結果


How-To
Step 1. 先檢查該 csv 的 file encoding.

Step 2. 修正後的 import 語法 (加上 encoding)
pop <- read.csv("F:/opendata106N0101.csv", header=TRUE, encoding = "UTF-8")

Step 3. 檢查結果