[Rd] Printing of anonymous functions in calls is sub-optimal

Hadley Wickham h.wickham at gmail.com
Fri Feb 15 16:45:18 CET 2013


e.g.

substitute(f(x), list(f = function(x) x + 1))
# function (x)
# x + 1(x)

An extra pair of parentheses would really help:

(function(x)
x + 1)(x)

(Better indenting etc would be nice, but not necessary for correct
understand of the code)

Hadley

-- 
Chief Scientist, RStudio
http://had.co.nz/



More information about the R-devel mailing list