[ESS] crtl cc on a short function

tyler tyler.smith at mail.mcgill.ca
Fri Jun 20 14:11:08 CEST 2008

markleeds at verizon.net writes:

> When I use control cc on a function such as below,
> mindiff <- function(df) df[which.min(df$diff), ]
> only the
> mindiff <- function(df) df
> part gets recognized by R so the function does nothing.
> But, if  I put squiggly brackets around the same function , as in
> mindiff <- function(df) { df[which.min(df$diff), ] }
> then everything works fine. If this not something that can be fixed by
> setting ESS options, then that's okay and I'll always put the squiggly
> brackets. But, if it can be fixed and someone knows what to put in my
> init.el, that would be great. thanks.

After a quick scan of the code I couldn't find a proper fix, but if
your short function is only one line long you can use C-c C-n to send
it. If it's more than one line, and there's a blank line after it, you
can send it with C-c C-p.



Only YOU can stop forest fires.

More information about the ESS-help mailing list