Re: [R] Debugging a program written in the R language

2006-03-09 Thread Earl F. Glynn
"Prof Brian Ripley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 8 Mar 2006, Liaw, Andy wrote: > So now is a very good time for > people to offer further information/suggestions for that chapter. This may be useful: Mark Bravington, "Debugging Without (Too Many) Tears," R

Re: [R] Debugging a program written in the R language

2006-03-09 Thread Robert Burrows
Thomas, This is what I use for writing R programs. I use it with Linux but adapting it for Windows shouldn't be that much of a problem for us MIT guys. In ~/.Rprofile (so it gets loaded every time I start R) I have myedit <- function(object) { system("if [ ! -d $HOME/stat-misc/Rsrc ]; the

Re: [R] Debugging a program written in the R language

2006-03-09 Thread Prof Brian Ripley
On Wed, 8 Mar 2006, Liaw, Andy wrote: [...] > Now, Roger Peng has kindly made available a note on debugging R code: > http://www.biostat.jhsph.edu/~rpeng/docs/R-debug-tools.pdf There is also a new chapter in the `Writing R Extensions' manual in the R-devel version of R (to be R 2.3.0). So now i

Re: [R] Debugging a program written in the R language

2006-03-08 Thread Gabor Grothendieck
On 3/8/06, Thomas L Jones <[EMAIL PROTECTED]> wrote: > >From Tom: > > The subject is debugging a program written in the R language,under > Windows. (Sorry, but I do not know either the Apple OS or *nix.) A > computer program will usually not work on the first try, if only > because of the risk of t

Re: [R] Debugging a program written in the R language

2006-03-08 Thread Ferdinand Alimadhi
The simplest way: 1. Write the program using your favorite text editor and save it i.e. c:/try.R 2. Open R and write source("c:/try.R") See "source" help (?source) for more information I would recommend that, even you are a windows user, you use the emacs package for statistic (ESS). There are

Re: [R] Debugging a program written in the R language

2006-03-08 Thread roger bos
You could always use notepad, but there are better solutions. There are many text editors which will send the commands to R for you and return the results and also offer syntax highlighting. I like Tinn-R. Xemacs is probably the best, but its hard to learn (IMHO) and I have not taken the time to

Re: [R] Debugging a program written in the R language

2006-03-08 Thread Michael H. Prager
From the R prompt, try typing ?source A good editor, specialized for working with R source on Windows, is Tinn-R. on 3/8/2006 4:12 PM Thomas L Jones said the following: > >From Tom: > > The subject is debugging a program written in the R language,under > Windows. (Sorry, but I do not know ei

Re: [R] Debugging a program written in the R language

2006-03-08 Thread Liaw, Andy
Firstly, some corrections: - It's best to write code as functions in R, just like most sensible languages. You can then debug the functions. - (X)Emacs has versions for Windows. Prof. John Fox has kindly made available some instructions on how Xemacs/ESS can be set up on Windows. Now, Roger Pe

[R] Debugging a program written in the R language

2006-03-08 Thread Thomas L Jones
>From Tom: The subject is debugging a program written in the R language,under Windows. (Sorry, but I do not know either the Apple OS or *nix.) A computer program will usually not work on the first try, if only because of the risk of typos. Instead, it must be debugged. Roughly, here is the seq