From p.dalgaard@biostat.ku.dk  Wed Jul 28 00:38:00 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 28 Jul 1999 01:38:00 +0200
Subject: Retaining comments when using `example'
In-Reply-To: Douglas Bates's message of "27 Jul 1999 17:41:48 -0500"
References: <6rk8rl7m1f.fsf@verdi.stat.wisc.edu>
Message-ID: <x23dy9d5pj.fsf@blueberry.kubism.ku.dk>

Douglas Bates <bates@stat.wisc.edu> writes:

> Is there a way to retain the comments?  I notice that `example' ends up
> calling the `source' function to do the actual running of the code.

Yeowch! This was not easy with the old comment-as-attribute model, and
it certainly did not get easier with the new keep-function-source
semantics.

The real trouble is - I suspect - an ancient one, inherited from S:

	source() doesn't

I.e. it does not work in the same way as the source command in a shell
would, interpreting a file as if it had been lines entered on the
command line, with some provision for skipping back to interactive
mode if there's an error. Rather, it parses the entire file (and
syntax checks it) and runs the resulting parsed expression. 

Perhaps we need a "real" source()?

-- 
   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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Retaining comments when using `example'
Peter Dalgaard BSA