Re: [R] error with source(): invalid 'times' value

2011-02-05 Thread Duncan Murdoch
This is somewhat fixed now in R-patched and R-devel, as of revision 54235. It won't die with an error, but it still might not be perfect. The problem is that the line #line 516 VolStocksDec2010.Rnw is taken as a statement by you that the next few lines are copied from line 516 and following

[R] error with source(): invalid 'times' value

2011-01-24 Thread Matthieu Stigler
hi I am seeing a strange behavior I can't understand... doing: source(/tmp/RFile.r,echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - : invalid 'times' value traceback() 3: rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - leading)) 2:

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Gabor Grothendieck
On Mon, Jan 24, 2011 at 12:07 PM, Matthieu Stigler matthieu.stig...@gmail.com wrote: hi I am seeing a strange behavior I can't understand... doing: source(/tmp/RFile.r,echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) -  :  invalid 'times' value traceback()

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Matthieu Stigler
Le 24. 01. 11 18:22, Gabor Grothendieck a écrit : On Mon, Jan 24, 2011 at 12:07 PM, Matthieu Stigler matthieu.stig...@gmail.com wrote: hi I am seeing a strange behavior I can't understand... doing: source(/tmp/RFile.r,echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading,

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread jim holtman
It sounds like you have some invalid expressions. Dump out the values of 'leading' and 'length(dep) - leading'. Learn some simple debugging techniques. One is to set options(error=utils::recover) so that on the error you can use the browser to examine what the values are. On Mon, Jan 24,

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Matthieu Stigler
ok, thanks Jim The problem comes from length(dep)leading, so we get negative number... length(dep) [1] 183 c(leading, length(dep) - leading) [1] 516 -333 But 183 seems to be the right number: $ wc -l /tmp/RFile.r 183 /tmp/RFile.r So now need to understand what is this dep, and why it has a

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Gabor Grothendieck
On Mon, Jan 24, 2011 at 12:29 PM, Matthieu Stigler matthieu.stig...@gmail.com wrote: Le 24. 01. 11 18:22, Gabor Grothendieck a écrit : On Mon, Jan 24, 2011 at 12:07 PM, Matthieu Stigler matthieu.stig...@gmail.com  wrote: hi I am seeing a strange behavior I can't understand... doing:

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread jim holtman
Do 'str(dep)' to see what dep is and where it comes from. If you have the 'options' set as I suggested, you can do this examination when the error occurs. On Mon, Jan 24, 2011 at 12:41 PM, Matthieu Stigler matthieu.stig...@gmail.com wrote: ok, thanks Jim The problem comes from

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread William Dunlap
: Monday, January 24, 2011 10:19 AM To: Matthieu Stigler Cc: r-help@r-project.org Subject: Re: [R] error with source(): invalid 'times' value Do 'str(dep)' to see what dep is and where it comes from. If you have the 'options' set as I suggested, you can do this examination when the error occurs

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Duncan Murdoch
On 11-01-24 12:07 PM, Matthieu Stigler wrote: hi I am seeing a strange behavior I can't understand... doing: source(/tmp/RFile.r,echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - : invalid 'times' value traceback() 3: rep.int(c(prompt.echo,

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread mat
Hi Well this is the output of str(dep) on a small example: str(dep) chr [1:8] ### ... Browse[1] dep [1] ### [2] ### chunk number 1: [3] ### [4] #line

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread mat
tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jim holtman Sent: Monday, January 24, 2011 10:19 AM To: Matthieu Stigler Cc: r-help@r-project.org Subject: Re: [R] error with source(): invalid 'times' value Do 'str(dep

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread mat
Le 24. 01. 11 20:43, Duncan Murdoch a écrit : On 11-01-24 12:07 PM, Matthieu Stigler wrote: hi I am seeing a strange behavior I can't understand... doing: source(/tmp/RFile.r,echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - : invalid 'times' value

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread William Dunlap
-Original Message- From: mat [mailto:matthieu.stig...@gmail.com] Sent: Monday, January 24, 2011 2:09 PM To: William Dunlap Cc: jim holtman; r-help@r-project.org; murdoch.dun...@gmail.com Subject: Re: [R] error with source(): invalid 'times' value indeed this makes the trick

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Duncan Murdoch
On 11-01-24 5:09 PM, mat wrote: Le 24. 01. 11 20:43, Duncan Murdoch a écrit : On 11-01-24 12:07 PM, Matthieu Stigler wrote: hi I am seeing a strange behavior I can't understand... doing: source(/tmp/RFile.r,echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep)