Re: [R] Data frames, passing by value, and performance (Matt Shotwell)

2010-05-24 Thread biostatmatt
R is pretty smart about duplicating only when necessary. That is, arguments passed to a function are copy-on-write. Also, I think (someone more knowledgeable please correct if I'm wrong) it may be better to use the data frame, which is just a list internally, because if you only modify one column,

Re: [R] Wait for keystroke or timeout

2010-05-27 Thread biostatmatt
On Thu, 2010-05-27 at 19:08 -0400, Prof. John C Nash wrote: > I would like to have a function that would wait either until a specified > timeout (in > seconds preferably) or until a key is pressed. I've found such a function > quite useful in > other programming environments in setting up dialo

Re: [R] Wait for keystroke or timeout

2010-05-27 Thread biostatmatt
On Thu, 2010-05-27 at 19:08 -0400, Prof. John C Nash wrote: > I would like to have a function that would wait either until a specified > timeout (in > seconds preferably) or until a key is pressed. I've found such a function > quite useful in > other programming environments in setting up dialogs

Re: [R] Calling fft from C

2010-05-30 Thread biostatmatt
The fft in R has the following C call chain file purpose src/main/names.c links R function "fft" to do_fft src/main/fourier.cdo_fft calls fft_factor, fft_work src/appl/fft.chome of fft_factor, fft_work If you want to use the fft at a low level, yo