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

Gabor Grothendieck
2011-01-24T17:22:11Z

On Mon, Jan 24, 2011 at 12:07 PM, Matthieu Stigler
<matthieu.stigler at 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()
> 3: rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) -
> ? ? ? leading))
> 2: paste(rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) -
> ? ? ? leading)), dep, sep = "", collapse = "\n")
> 1: source("/tmp/RFile.r", echo = TRUE)>>
>
> But the file I am trying to source is very simple... see:
> $ more /tmp/RFile.r
> ###################################################
> ### chunk number 1:
> ###################################################
> #line 516 "VolStocksDec2010.Rnw"
> path<-"~/Dropbox/FAO/Papers/Volatility only"
> pathMarkov<-"~/Dropbox/FAO/Markov Model/"
> library(zoo)
>
> Any idea where it can come from? It works fine when echo=FALSE... I am
using
> R 2.12, on Ubuntu Linux 10.4 (R from CRAN), full session info below. Should
> I rather send this to r-devel?
>

Does this work?

source("/tmp/RFile.r", echo = TRUE, prompt.echo = NULL, continue.echo
= "+ ")


--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com