SublimeREPL Unable to Find R

一个人想着一个人 提交于 2019-12-03 02:46:29

Go to Preferences -> Browse Packages... and create a directory tree User/SublimeREPL/config/R. In that directory, create a new file named Main.sublime-menu with the following contents:

[
     {
        "id": "tools",
        "children":
        [{
            "caption": "SublimeREPL",
            "mnemonic": "r",
            "id": "SublimeREPL",
            "children":
            [
                {"command": "repl_open",
                 "caption": "Rterm",
                 "id": "repl_r",
                 "mnemonic": "r",
                 "args": {
                    "type": "subprocess",
                    "external_id": "r",
                    "additional_scopes": ["tex.latex.knitr"],
                    "encoding": {"windows": "$win_cmd_encoding"},
                    "soft_quit": "\nquit(save=\"no\")\n",
                    "cmd": {"windows": ["C:/Program Files/R/R-3.0.2/bin/x64/Rterm.exe", "--ess", "--encoding=$win_cmd_encoding"]},
                    "cwd": "$file_path",
                    "extend_env": {"windows": {"PATH": "{PATH}:/C/Program Files/R/R-3.0.2/bin"}},
                    "cmd_postfix": "\n",
                    "suppress_echo": {"windows": false},
                    "syntax": "Packages/R/R.tmLanguage"
                    }
                }
            ]
        }]
    }
]

Save the file, and you should now have a Tools -> SublimeREPL -> Rterm menu option. Double-check that the path is the correct one to the Rterm.exe file. On my computer (32-bit XP) it's in the i386 subfolder of bin, so yours may be in bin/x64 or something like that.

I hope this helps, let me know if you still have issues.

I resolved this by adding the location of Rterm.exe to PATH

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!