source(,echo=T) doesn't echo comments (PR#296)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
21 Oct 1999 19:30:53 +0200


maechler@stat.math.ethz.ch writes:

> >>>>> "TL" == Thomas Lumley <thomas@biostat.washington.edu> writes:
> 
>     TL> I don't know if this is a bug report or a feature request, but a
>     TL> colleague complained that source(,echo=T) doesn't echo the comments
>     TL> from the source file.
> 
> This is what the new comment treatment brought us
> {I hate it as well;  also applies to   example(.)}.
> 
> It seemed very hard to correctly attach comments to expressions,
> (remember all the misplaced comments in 0.63.x ?).
> so now the parser already throws all comments into the trash can.
> No way to see them anymore.
> AFAIK, we only see them with functions that have "keep.source"
> Peter Dalgaard will be able to elaborate.

There's not much more to say. If anyone can think of a better
scheme (perhaps keeping line numbers with the parsed expressions and
rereading the file?)...

The keep.source functionality is also a mixed blessing. It prevents
the system from throwing away things that were commented out and
messing up carefully formatted code, but is also leaves you stuck with
that which was sloppily writte to begin with.

Otherwise we have to rethink the parser. 
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._