a=r"(C:\Users\10539\Desktop\NBA一些资料) a 这里用了原生字符 可参考 https://www.cnblogs.com/soldier-justice/p/15200277.html 替换方法 gsub("\\\\", "/", a)