Warning in (function (file = "", n = NULL, text = NULL, prompt = "?", keep.source = getOption("keep.source"), :
argument encoding="UTF-8" is ignored in MBCS locales

主要原因還是字符集的問題,之前說的方法其實也還會有問題 索性就
Sys.setlocale(category = 'LC_ALL', locale = 'English_United States.1252')
來自:https://ask.csdn.net/questions/7474646的回答!

如果中文亂碼,就設置成中文
Sys.setlocale("LC_ALL","Chinese")
但是可能繼續報警告hhhhh
