Re: [Rd] incomplete results from as.character.srcref() in some cases involving quote()

2018-06-20 Thread Georgi Boshnakov
Boshnakov; r-devel@r-project.org Subject: Re: [Rd] incomplete results from as.character.srcref() in some cases involving quote() wholeSrcref attribute is documented in ?parse to be the source reference corresponding to the already parsed text. The implementation in the parser matches the

Re: [Rd] incomplete results from as.character.srcref() in some cases involving quote()

2018-06-20 Thread Tomas Kalibera
wholeSrcref attribute is documented in ?parse to be the source reference corresponding to the already parsed text. The implementation in the parser matches the documentation - the code stops at the last byte/character of the expression, that is, on the closing brace - which is the "already pars

[Rd] incomplete results from as.character.srcref() in some cases involving quote()

2018-06-18 Thread Georgi Boshnakov
Hi, The result of as,character() on 'srcref' objects doesn't have the closing ')' in some cases involving 'quote': > e4 <- quote({2+2}) > class(attr(e4, "wholeSrcref")) [1] "srcref" > as.character(attr(e4, "wholeSrcref")) [1] "e4 <- quote({2+2}" As a result printing the object also lacks it a