Sublime Text 2 and R

前端 未结 4 1972
旧时难觅i
旧时难觅i 2021-02-04 17:26

I am trying to use Sublime Text 2 as an interface to the statistics software R [update/edit: Solved!].

On Windows, I have tried the following:

  1. Installed

相关标签:
4条回答
  • 2021-02-04 17:49

    For linux users, take a look:

    Sublime Text 2 R build System

    It supports multi selection and interactive R sessions.

    0 讨论(0)
  • 2021-02-04 17:51

    The build system value needs to be an array so you want;

    {
      "cmd": ["C:/Program Files/R/R-2.9.2/bin/R.exe", "--no-save", "$File"]
    }
    

    https://docs.sublimetext.io/guide/usage/build-systems.html#file-format

    0 讨论(0)
  • 2021-02-04 17:55

    For windows system you can add a new build for R (Tools -> Build System -> New Build System) and put the following lines. Modify the path according to your R installation directory.

    {"cmd": ["Rscript.exe", "$file"],
    "path": "C:\\Program Files\\R\\R-2.15.2\\bin\\x64\\",
    "selector": "source.r"}
    

    You can execute the entire file by pressing ctrl+B instead of starting SublimeREPL.

    0 讨论(0)
  • 2021-02-04 18:00

    Open SublimeREPL's user settings like this: Preferences -> Package Settings -> SublimeREPL -> Settings - User

    there set default_extend_path to point to your R installation:

    {
        "default_extend_env": {"PATH": "{PATH};C:\\Program Files\\R\\R-2.14.2\\bin\\i386"}  
    }
    

    Running Tools -> SublimeREPL -> R should launch REPL as expected.

    0 讨论(0)
提交回复
热议问题