0

Is there any clever way to select a 'condensed function' by just clicking the line number and another key (R 3.0 on Mac OSX)? Currently when I select the line with the condensed function code only the first line of the code is selected and I have to manually select the last } to make sure it loads properly.

Elizabeth
  • 6,391
  • 17
  • 62
  • 90
  • 2
    I suggest you use one of the IDEs that will greatly improve your workflow. There are many choices out there (http://stackoverflow.com/questions/1097367/what-ides-are-available-for-r-in-linux) but recently, RStudio has been ahead of a lot of them. – Roman Luštrik Aug 15 '13 at 09:17
  • Thanks. I will give R studio a go – Elizabeth Aug 15 '13 at 09:48
  • Can't you just put the cursor on the line and hit *CMD* + *Enter*. I thought the editor in R on Mac was clever that way? (but my MBP is at home so I can't test that!). – Simon O'Hanlon Aug 15 '13 at 10:14
  • @SimonO101 No I'm afraid it exclude the last } and in effect only runs the first line of the code. Seems like there would be some sort of cmd+ shortcut though.... – Elizabeth Aug 15 '13 at 10:43
  • 1
    If your text file contains just the function of interest, -e will `source` the entire file, hence load your function for you. Recommend you read the R-OSX FAQ and what built-in help there is for `R.app` . – Carl Witthoft Aug 15 '13 at 11:28

0 Answers0