Using Rstudio as an IDE for other programming languages (Stata)

删除回忆录丶 提交于 2019-12-10 14:42:51

问题


I love the Rstudio IDE and the easy point click git(hub) integration.

Can I use Rstudio as an IDE for other programming languages?

In particular, besides R/Rstudio, I use Stata a lot. Stata is great, but the programing environment (do file editor) is years behind. According to this guide, Stata can be set up to run from other text editors (Emacs, etc).

Could I set it up to run from Rstudio? Can Rstudio support syntax highlighting for Stata language? If so can I add a shortcut or command in Rstudio to execute Stata code chunks?


回答1:


I recommend looking at Sublime Text (3, which is still in beta, is the recommended version). Sublime (aka ST) has tools and features that have made it a very popular choice for many programmers.

To get Stata and ST to play well together, take the following additional steps:

  1. Install package control for whatever operating system you're using.
  2. From within package control, install your Stata package of choice. I believe StataEditor is the preferred version for Windows and StataEnhanced for OS X. These will provide you with syntax highlighting.
  3. From within whatever package you choose to install, review the readme file to see how to use ST's cmd+b keyboard shortcut to send .do files directly to Stata for processing without having to switch applications out of ST and into Stata.

Just FYI, the Stata syntax highlighting packages were developed from the old TextMate Stata package. This means that, if you can find the components, any modern text editor which can accept TextMate packages will give you syntax highlighting and, at a minimum, a more visually pleasant coding environment than the Stata editor.




回答2:


You could always try using Stata as a knitr engine. MWE can be found here.

Syntax highlighting - most likely not. At least not out of the box.



来源:https://stackoverflow.com/questions/38598003/using-rstudio-as-an-ide-for-other-programming-languages-stata

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