Tips for Using StatET and Eclipse for Data Analysis in R

[This article was first published on Jeromy Anglim's Blog: Psychology and Statistics, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

My favourite editor for conducting analysis in R is the StatET plug-in for Eclipse. This post discusses an assortment of tips and tricks that I’ve discovered to make this editing environment even better.

Search
  • Search (Control + H): I maintain projects in the project explorer. If I need to know how I have used an R function in the past, I search for the function name.
Options for Running R Code
  • List Run Options (Control + R)
  • Run entire command (Control + R Control + E): Press this key combination on the identifier for a function to run entire function (particularly useful for running nested functions). It’s also useful when you have a line of code that spans multiple lines.
  • Run Function Definition (Control + R Control + F): Fun function definition; If you have nested functions, this key combination runs the both outer and inner functions. Thus, don’t use this to refresh the function definition of a nested function.

    Coding
    • Fix Indentation  (Control + I)
    • Delete Line (Control + D)
    • Code Folding

      • Expand Current: (Control + Num “+”)
      • Collapse Current (Control + Num “-“)
      • Collapse All (Control + Shift + Num “/”)
      • Expand All (Control + Num “*”)
      • Enable/Disable Code Folding (Control + Num “/”)
    Help
    • List tips and tricks (Help – Tips And Tricks – Eclipse Platform)
    • View all short cut keys (Control + Shift + L):
    Outline View
    • Highlight Outline (Alt + Shift Q, O)
    • Refresh code in a function (right click on function in Outline)
    • Cut and paste functions (Use Outline View)

      Assorted
      • Get file path (Alt W, V, P, P, Enter; Navigate to file; Alt + Enter; Alt + L; Shift + End; Shift + Down; Control + c)
      • Go to function definition (Copy function name; Control + Tab to go to function sheet; control + home to go to top of function sheet; control + F to find; control + v to paste; Enter; Esc)
      • Activate cursor in console (Control + R, C)
      • Activate cursor in editor (F12)
      • Toggle maximisation of current window (Control + M)
      • Auto completion (Control + /); this does not worke with dot.case.identifiers. Thus, this is another reason to prefer mixedCaseIdentifiers.
      • Print current variable (Control + R, P); this is useful when writing functions; I might run an assignment (control + R, control + R) and then print the result. However, it is problematic when there is a lot of data.
      • Change variable names (Control + 1)
      • Opening Files in Project Editor based on standard file association (Right Click File – Open With – System Editor). Many files will open within StatET. This is sometimes undesirable.

      To leave a comment for the author, please follow the link and comment on their blog: Jeromy Anglim's Blog: Psychology and Statistics.

      R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
      Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

      Never miss an update!
      Subscribe to R-bloggers to receive
      e-mails with the latest R posts.
      (You will not see this message again.)

      Click here to close (This popup will not appear again)