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

2013-02-16 Thread William Dunlap
> I suspect it's only when you have a function in the quoted call, not a symbol: Add a call to 'function' (as opposed to the function made by evaluating that call) to your test suite: > Q <- list( q1 = quote(getFunction("-")(x)), q2 = substitute(f(x), list(f = function(x) {-x

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

2013-02-16 Thread Duncan Murdoch
On 13-02-16 10:22 AM, Hadley Wickham wrote: This is a little tricky for the deparser. It sees a call to a function which was determined by an expression. Sometimes you want parens, sometimes you don't. For example, if getfun(y) returns a function, it's clearer to display a call as getfun(y)(x)

Re: [Rd] Suggestion: Custom filename patterns for non-Sweave vignettes

2013-02-16 Thread Henrik Bengtsson
Hi, as said at the end, all comments are now in the light of R 3.x.0 (x > 0). On Fri, Feb 15, 2013 at 11:30 AM, Duncan Murdoch wrote: > On 13-02-15 1:53 PM, Henrik Bengtsson wrote: >> >> Hi Duncan, >> >> thanks you for your prompt reply. >> >> >> On Fri, Feb 15, 2013 at 1:15 AM, Duncan Murdoch

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Simon Urbanek
On Feb 15, 2013, at 6:13 PM, Hin-Tak Leung wrote: > FWIW, extracting snapshot source elsewhere outside svn, run > "tools/rsync-recommended" then just plain "./configure && make" doesn't work > either. Nothing to do with building inside checkout nor extra configure > options. > Can you define

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

2013-02-16 Thread Duncan Murdoch
On 13-02-16 10:19 AM, Hadley Wickham wrote: On Sat, Feb 16, 2013 at 12:24 AM, Bert Gunter wrote: As there has been no response to this ... Why not simply: g <- substitute(f(x),list(f=function(x){x+1})) ## with curly braces g function (x) { x + 1 }(x) x <- 2 eval(g) [1] 3 Thomas Lum

[Rd] RSetReg.exe

2013-02-16 Thread Gabor Grothendieck
R.exe, Rgui.exe, Rcmd.exe and Rscript.exe all support the --help argument but RSetReg.exe --help ignores the argument and attempts to set the registry key. Since one might try this as a first attempt to figure out what the command is all about this seems a bit dangerous. It would be nice if it res

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Hadley Wickham
> Although it goes a long way, it doesn't always work -- it assumes that the > directory structure did not change in the project between the revisions - > distclean may not clean things that have changed since you updated the SVN > (note that to address that you should run distclean *before* the

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

2013-02-16 Thread Hadley Wickham
> This is a little tricky for the deparser. It sees a call to a function > which was determined by an expression. Sometimes you want parens, sometimes > you don't. For example, if getfun(y) returns a function, it's clearer to > display a call as getfun(y)(x) than (getfun(y))(x). > > I'll see if

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

2013-02-16 Thread Hadley Wickham
On Sat, Feb 16, 2013 at 12:24 AM, Bert Gunter wrote: > As there has been no response to this ... > > Why not simply: > >> g <- substitute(f(x),list(f=function(x){x+1})) ## with curly braces >> g > function (x) > { > x + 1 > }(x) >> x <- 2 >> eval(g) > [1] 3 Thomas Lumley sent me a similar sug

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

2013-02-16 Thread Duncan Murdoch
On 13-02-15 10:45 AM, Hadley Wickham wrote: 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) This is

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Simon Urbanek
On Feb 16, 2013, at 8:03 AM, Roger Bivand wrote: > Hin-Tak Leung users.sourceforge.net> writes: > >> >> --- On Fri, 15/2/13, Simon Urbanek r-project.org> wrote: >> >>> On Feb 15, 2013, at 1:55 PM, Hin-Tak Leung wrote: >>> Look. I don't see this as "my" problem - as far as I am >>> conc

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Roger Bivand
Hin-Tak Leung users.sourceforge.net> writes: > > --- On Fri, 15/2/13, Simon Urbanek r-project.org> wrote: > > > On Feb 15, 2013, at 1:55 PM, Hin-Tak Leung wrote: > > > > > Look. I don't see this as "my" problem - as far as I am > > concerned, I have donated my time - and over and over - to >

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

2013-02-16 Thread Bert Gunter
As there has been no response to this ... Why not simply: > g <- substitute(f(x),list(f=function(x){x+1})) ## with curly braces > g function (x) { x + 1 }(x) > x <- 2 > eval(g) [1] 3 Cheers, Bert On Fri, Feb 15, 2013 at 7:45 AM, Hadley Wickham wrote: > e.g. > > substitute(f(x), list(f = f

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Joshua Ulrich
On Fri, Feb 15, 2013 at 12:19 PM, Kasper Daniel Hansen wrote: > I build from svn daily and I have not had this problem. I build in a > tree separate from the source tree. > > I do think Hin-Tak has a point about clearly specifying that this is > how you should do it, in the manual (if that has no

Re: [Rd] Matrix does not build with R trunk since Oct.

2013-02-16 Thread Kasper Daniel Hansen
On Fri, Feb 15, 2013 at 1:25 PM, Joshua Ulrich wrote: > On Fri, Feb 15, 2013 at 12:19 PM, Kasper Daniel Hansen > wrote: >> I build from svn daily and I have not had this problem. I build in a >> tree separate from the source tree. >> >> I do think Hin-Tak has a point about clearly specifying tha