我有一個看起來像的字符串:str<-"a\f\r"我正在嘗試刪除反斜杠,但沒有任何效果:gsub("\","",str, fixed=TRUE)gsub("\\","",str)gsub("(\)","",str)gsub("([\])","",str)...基本上所有您可以想象的變化。我什至嘗試了該string_replace_all功能。有幫助嗎?我正在使用R版本3.1.1;Mac OSX 10.7;將dput在我的琴弦的矢量一個字符串給出:dput(line)"ud83d\ude21\ud83d\udd2b"我使用的是readLines從標準 .txt文件導入的 文件。該文件的內容類似于: got an engineer booked for this afternoon \ud83d\udc4d all now hopefully sorted\ud83d\ude0a I m going to go insane ud83d\ude21\ud83d\udd2b in utf8towcs … 謝謝。
- 3 回答
- 0 關注
- 1500 瀏覽
添加回答
舉報
0/150
提交
取消