Eclipse plug-ins that can edit R code

Source: Internet
Author: User

when it comes to powerful ide,eclipse is certainly one of the first to be thought of, fortunately, R can also use it. There is a statet plugin on http://www.walware.de/goto/statet, specifically for R, from which you can enjoy all of eclipse's capabilities on the Eclipse platform.

If there is no eclipse on the machine, you can find many very detailed tutorials in the Java-related community on the web, the Rjava package in the JRE and R is required, and it is recommended that you install the JDK as well, and Eclipse has a good environment, so it's too bad to use Java. People who can write R programs will certainly be able to write Java programs, and R and Java can all be good partners. You can search the Web for a tutorial on installing JDK and Eclipse, so you can install the JRE and Install.packages ("Rjava") in R. (You can experiment with Java call R in Eclipse, see previous blog post)

Eclipse on my machine is a 3.3.2 version of MyEclipse, with different versions of the menu or interface, but it's easy to find them. Installing the Statet can be done directly via the Eclipse's install plugin feature. Under my version, go to help–> software updates–> Find and install, select Search for new features to install, enter Http://download.walware . de/eclipse-3.7, can be named Statet. The plugin can be installed automatically after confirmation, but it is not available now and requires some configuration.

First, enter window–> Open perspective–> Other, the default Java perspective (equivalent to different interface environment or perspective) to Statet, you can find that the display interface will have some adjustments, and the toolbar can see the R related icons, this is for r, or you can further modify the various columns.

Then configure the interactive environment of R, enter windows–> Preferences (and configure Tomcat in a similar way), click Statet, expand R Interaction, click R environments, first the header name dialog Box's name R is modified to the name of your own version of R: R-2.12.1 then click Next to R_home +, select elect Browse Filesystem Add the installation directory of R, for example c:\R\R-2.12.1. Confirm exit.

Because the default mode of operation is not rterm, you also need to configure how R runs. Enter run–> run configurement, you can open the Run Configuration interface, find R Console, double-click to generate a new configuration named New_configuration, you can name it r 2.10, under the Default Main tab, Change the launch type to Rterm. You can then enter-Q in the Options/arguments box so that the version information is not printed at startup. Click Apply to set the success. Then click Run to see that the bottom of the console bar has already started running R. This configuration is all done.

Next Test, create a new project Rtest (file–> new–> r-project), select or create a new folder (which you will encounter when installing eclipse under the workplace of Eclipse). On the left side of the engineering tree you can see that Rtest has appeared, right-click new–> r-script file, generate an R file, tap the code, select all, click Run Selection in the R icon that appears on the toolbar, The command was automatically run in the console at the bottom of the discovery. Note that there is an input line at the bottom of the console, which can be manually typed into the R code and can be run in the console after the carriage return.

To close the rterm before exiting, click on the Red box above console to indicate Termanate, and the rterm will be turned off. If you need to turn on the pre-click configured R 2.10, then OK.

For the use of shortcuts or the configuration of font display, you can refer to Eclipse's tutorial to give full play to eclipse's powerful features.

For further information, please refer to: http://www1.appstate.edu/~arnholta/classes/InstallingR.pdf

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.