From romain.francois at dbmail.com  Tue Dec  1 10:59:46 2009
From: romain.francois at dbmail.com (Romain Francois)
Date: Tue, 01 Dec 2009 10:59:46 +0100
Subject: [Rd] Bug in R evaluating a huge instruction (PR#14096)
In-Reply-To: <4B14AEB1.9090206@codelutin.com>
References: <20091130155010.4EFF1282EFE3@mail.pubhealth.ku.dk>	<4B144659.6090702@stats.uwo.ca>
	<4B14AEB1.9090206@codelutin.com>
Message-ID: <4B14E912.7090505@dbmail.com>


Hello,

Since we don't have the morris function, I have tested using this one:

 > morris <- function(...) lapply(list(...), str )

If I just copy and paste into the console, R waits for more input, but 
if I parse the file, it is fine:

 > eval( parse( "morrisError.R" ) )
  NULL
  chr [1:86] "PecheAmateurs d?cembre.proportionMetier" ...
  num 10
List of 3
  $ type     : chr "oat"
  $ levels   : num [1:86] 5 5 5 5 5 5 5 5 5 5 ...
  $ grid.jump: num [1:86] 2 2 2 2 2 2 2 2 2 2 ...
  num [1:86] 0 0 0 11 10 12 0.06 10 11 0 ...
  num [1:86] 1 1 1 15 14 16 0.09 14 15 2 ...


Also fine if I source the file:

 > a<-morris(model=NULL,factors=c("PecheAmateurs 
d?cembre.proportionMetier","PechePetitMetierMer 
mai.proportionMetier","PecheAmateurs mai.proportionMet ..." ... [TRUNCATED]
  NULL
  chr [1:86] "PecheAmateurs d?cembre.proportionMetier" ...
  num 10
List of 3
  $ type     : chr "oat"
  $ levels   : num [1:86] 5 5 5 5 5 5 5 5 5 5 ...
  $ grid.jump: num [1:86] 2 2 2 2 2 2 2 2 2 2 ...
  num [1:86] 0 0 0 11 10 12 0.06 10 11 0 ...
  num [1:86] 1 1 1 15 14 16 0.09 14 15 2 ...


I think the limit imposed by the R_ParseBuffer function (in gram.y) is 
1024 characters.

Romain


On 12/01/2009 06:50 AM, Jean Couteau wrote:
> Thanks for your time Duncan,
>
> I join here the instruction that is not correct, hoping that might help
> you. The file is encoded in utf-8 so you should not have any problem
> reading it.
>
> I doubt to that it is an R bug too, but with all my tests i am less and
> less sure of that.
>
> Best regards,
> Jean Couteau
>>
>> Your message has encoding problems, so it's not readable. Could you
>> put the code online somewhere where we could download it in its
>> original form? I doubt if this is an R bug, but I can't point out the
>> problem in your code (or confirm that it really is an R bug) without
>> an undamaged copy of the code.
>>
>> Duncan Murdoch


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/FtUu : new package : highlight
|- http://tr.im/EAD5 : LondonR slides
`- http://tr.im/BcPw : celebrating R commit #50000



[Rd] Bug in R evaluating a huge instruction (PR#14096)
Romain Francois