Re: [R] Increasing Console "Paste Buffer"

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Wed 01 Jun 2005 - 21:03:00 EST

Sander Oom wrote:
> An interesting thought just came to me when reading this discussion! I
> use both R and Latex and have never had the trouble of overlooking error
> messages when debugging long Latex code!
>
> Of course this is because when compiling a latex document, a summary of
> the compilation process is provided at the end! If any errors occurred,
> they will be mentioned in the summary.
>
> Maybe R could provide the same summary as an optional part of the
> source() command!?
>

I think it does, doesn't it? R will stop at the first error and print it, e.g.

 > source('c:/temp/test.R')
Error in parse(file, n = -1, NULL, "?") : syntax error on line 4

  If there were only warnings, it will show them at the end:

 > source('c:/temp/test.R')
Warning messages:
1: longer object length

         is not a multiple of shorter object length in: 1:3 + 1:4 2: longer object length

         is not a multiple of shorter object length in: 1:3 + 1:4

Even if you use echo=TRUE, these summaries show up at the end. It's only if you use cut and paste that you might miss these.

Duncan Murdoch



R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 01 21:09:01 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:20 EST