Re: [Rd] calls with comment attribute

2019-11-12 Thread William Dunlap via R-devel
I suspect that the parser used it to store comments, including the initial "#", before R started using the srcref attribute. (S also stored comments in the parse tree.) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Nov 12, 2019 at 4:16 PM Duncan Murdoch wrote: > On 12/11/2019 5:01 p.m.

Re: [Rd] calls with comment attribute

2019-11-12 Thread Duncan Murdoch
On 12/11/2019 5:01 p.m., William Dunlap via R-devel wrote: In general R doesn't print the "comment" attribute of an object > structure(1:3, comment=c("a comment", "another comment")) [1] 1 2 3 but if the object is a call it prints it in an unusual format > structure(quote(func(arg)),

Re: [Rd] calls with comment attribute

2019-11-12 Thread Gabriel Becker
Bill, Without being involved in that code at all, it seems that this could be used to (re)create commented source code from R objects. That format seems to correspond directly to a call in a .R file with two comments above it. A bit weird there's no comment character there but I guess thats expect

Re: [Rd] class() |--> c("matrix", "arrary") [was "head.matrix ..."]

2019-11-12 Thread Abby Spurdle
> You can have your own rant about "user-defined binary operators being > over-used within the R community" without suggesting that my rant was > rude. I wasn't suggesting that you were rude. I was questioning a trend. __ R-devel@r-project.org mailing l

[Rd] calls with comment attribute

2019-11-12 Thread William Dunlap via R-devel
In general R doesn't print the "comment" attribute of an object > structure(1:3, comment=c("a comment", "another comment")) [1] 1 2 3 but if the object is a call it prints it in an unusual format > structure(quote(func(arg)), comment=c("a comment", "another comment")) a comment anoth

Re: [Rd] class() |--> c("matrix", "arrary") [was "head.matrix ..."]

2019-11-12 Thread Pages, Herve
On 11/12/19 12:21, Abby Spurdle wrote: > > >> x %inherits% "data.frame" > > IMHO, I think that user-defined binary operators are being over-used > within the R community. > > I don't think that they're "cute" or stylish. > I think their use should be limited to cases, where they significant

Re: [Rd] class() |--> c("matrix", "arrary") [was "head.matrix ..."]

2019-11-12 Thread Abby Spurdle
>x %inherits% "data.frame" IMHO, I think that user-defined binary operators are being over-used within the R community. I don't think that they're "cute" or stylish. I think their use should be limited to cases, where they significantly increase the readability of the code. However, readab