Re: Retaining comments when using `example'

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: Retaining comments when using `example'
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Wed 28 Jul 1999 - 09:38:00 EST


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


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:06 EST