Skip to content
Prev 14532 / 63424 Next

a better "source(echo=TRUE)" {was "....how to pause...."}

[...]

  > But to do this might be more tricky than at first thought:
  > Of course you can readLines() the source file and writeLines()
  > them to whatever your console is. The slightly difficult thing
  > is to "see" which junks to ``send to R'' , i.e. to parse() and eval().
  > The basic problem seems to see when expressions are complete.
> function with extended behavior} such that it would not only
  > return the parse()d expressions, but also indices (byte or even
  > line counters) to the source text, indicating where each of the
  > expression started and ended.

  > That way I could see a way to proceed.

Yes, that would be also *very* handy for Sweave, where I parse/deparse
exactly for the reasons Martin describes: to get complete expressions
and to know where output should be inserted.

.f