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

Gabor Grothendieck ggrothendieck at gmail.com
Mon Jan 24 18:22:11 CET 2011


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



More information about the R-help mailing list