couteau at codelutin.com
2009-Nov-30 15:50 UTC
[Rd] Bug in R evaluating a huge instruction (PR#14096)
Hello, I do not know if i am facing a bug or a mistake (and if it is a bug i do not know in which category I can put it on the bug tracker), so I post=20 my message here. I am trying to use the Morris function from the sensitivity package (but that is not the problem). I created a (big) instruction that should=20 generate a morris object in which there is a data.frame i am interested=20 in. My instruction is : a<-morris(model=3DNULL,factors=3Dc("PecheAmateurs=20 d=E9cembre.proportionMetier","PechePetitMetierMer=20 mai.proportionMetier","PecheAmateurs=20 mai.proportionMetier","PecheChalutiere=20 janvier.minInactivityDays","PechePetitMetierEtang=20 octobre.minInactivityDays","PechePetitMetierEtang=20 d=E9cembre.minInactivityDays","FiletMer.standardisationFactor","PecheAmateurs=20 juin.minInactivityDays","PechePetitMetierEtang=20 novembre.minInactivityDays","PechePetitMetierMer=20 septembre.minInactivityDays","PechePetitMetierMer=20 avril.minInactivityDays","PecheAmateurs=20 ao=FBt.proportionMetier","PecheChalutiere=20 novembre.minInactivityDays","PechePetitMetierMer=20 f=E9vrier.proportionMetier","PecheChalutiere=20 juillet.minInactivityDays","PechePetitMetierMer=20 octobre.proportionMetier","CSar Groupe=20 5.reproductionRate","PechePetitMetierMer=20 ao=FBt.proportionMetier","PechePetitMetierMer=20 janvier.minInactivityDays","PechePetitMetierEtang=20 mai.minInactivityDays","PecheAmateurs=20 octobre.minInactivityDays","PecheAmateurs=20 septembre.minInactivityDays","PecheChalutiere=20 juin.minInactivityDays","PecheChalutiere=20 avril.minInactivityDays","PecheAmateurs=20 juillet.proportionMetier","PecheChalutiere=20 mai.minInactivityDays","PechePetitMetierEtang=20 septembre.minInactivityDays","PechePetitMetierMer=20 janvier.proportionMetier","PecheAmateurs=20 septembre.proportionMetier","PechePetitMetierEtang=20 f=E9vrier.minInactivityDays","PechePetitMetierEtang=20 mars.minInactivityDays","PechePetitMetierEtang=20 juillet.minInactivityDays","PechePetitMetierMer=20 septembre.proportionMetier","CSar.capturability","PechePetitMetierMer=20 juin.proportionMetier","PecheChalutiere=20 mars.minInactivityDays","PecheChalutiere=20 septembre.minInactivityDays","PecheAmateurs=20 janvier.minInactivityDays","PechePetitMetierMer=20 ao=FBt.minInactivityDays","PechePetitMetierMer=20 juillet.proportionMetier","PecheChalutiere=20 d=E9cembre.minInactivityDays","PecheAmateurs=20 avril.minInactivityDays","PecheAmateurs=20 mars.proportionMetier","PechePetitMetierMer=20 novembre.minInactivityDays","PechePetitMetierEtang=20 ao=FBt.minInactivityDays","CSar.recruitmentDistribution","PecheChalutiere=20 f=E9vrier.minInactivityDays","CSar.naturalDeathRate","PecheAmateurs=20 octobre.proportionMetier","PechePetitMetierMer=20 mai.minInactivityDays","PechePetitMetierMer=20 mars.proportionMetier","PecheAmateurs=20 ao=FBt.minInactivityDays","FiletEtang.standardisationFactor","PecheChalutiere=20 ao=FBt.minInactivityDays","PecheAmateurs=20 janvier.proportionMetier","PecheAmateurs=20 d=E9cembre.minInactivityDays","PechePetitMetierEtang=20 avril.minInactivityDays","PecheAmateurs=20 mars.minInactivityDays","PechePetitMetierMer=20 d=E9cembre.minInactivityDays","PecheAmateurs=20 mai.minInactivityDays","PechePetitMetierEtang=20 juin.minInactivityDays","Harpon.standardisationFactor","PecheAmateurs=20 novembre.minInactivityDays","PecheAmateurs=20 novembre.proportionMetier","PechePetitMetierMer=20 mars.minInactivityDays","Ligneemb.standardisationFactor","PecheAmateurs=20 juin.proportionMetier","PecheAmateurs=20 avril.proportionMetier","PechePetitMetierMer=20 juillet.minInactivityDays","PechePetitMetierMer=20 avril.proportionMetier","PechePetitMetierMer=20 octobre.minInactivityDays","PechePetitMetierMer=20 f=E9vrier.minInactivityDays","PecheAmateurs=20 juillet.minInactivityDays","PechePetitMetierMer=20 d=E9cembre.proportionMetier","PecheAmateurs=20 f=E9vrier.proportionMetier","PecheChalutiere=20 octobre.minInactivityDays","CSar Groupe 4.reproductionRate","CSar Groupe 7.reproductionRate","Lignecote.standardisationFactor","CSar.meanWeight","CSar=20 Groupe 6.reproductionRate","PechePetitMetierMer=20 juin.minInactivityDays","PechePetitMetierMer=20 novembre.proportionMetier","PechePetitMetierEtang=20 janvier.minInactivityDays","PecheAmateurs=20 f=E9vrier.minInactivityDays","CSar.growth"),r=3D10,design=3Dlist(type=3D"oat",levels=3Dc(5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5),grid.jump=3Dc(2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)),binf=3Dc(0.0,0.0,0.0,11.0,10.0,12.0,0.06,10.0,11.0,0.0,0.0,0.0,10.0,0.0,11.0,0.0,1120.0,0.0,10.0,22.0,12.0,10.0,10.0,11.0,0.0,11.0,15.0,0.0,0.0,23.0,16.0,22.0,0.0,0.0,0.0,11.0,10.0,18.0,0.0,0.0,11.0,11.0,0.0,3.0,22.0,0.0,8.0,0.0,0.0,0.0,0.0,8.0,0.1456,11.0,0.0,18.0,17.0,11.0,7.0,11.0,20.0,0.0464,16.0,0.0,1.0,0.1515,0.0,0.0,0.0,0.0,1.0,11.0,9.0,0.0,0.0,11.0,1120.0,1120.0,0.0749,0.0,1120.0,0.0,0.0,13.0,16.0,0.0),bsup=3Dc(1.0,1.0,1.0,15.0,14.0,16.0,0.09,14.0,15.0,2.0,2.0,1.0,14.0,1.0,15.0,1.0,1680=2E0,1.0,14.0,26.0,16.0,14.0,14.0,14.0,1.0,15.0,19.0,1.0,1.0,27.0,20.0,26=2E0,1.0,1.0,1.0,15.0,14.0,22.0,2.0,1.0,15.0,15.0,1.0,7.0,26.0,1.0,12.0,1=2E0,1.0,2.0,1.0,12.0,0.2184,15.0,1.0,22.0,21.0,15.0,11.0,15.0,24.0,0.0696,20.0,1.0,5.0,0.22,1.0,1.0,2.0,1.0,5.0,15.0,13.0,1.0,1.0,15.0,1680.0,1680.0,0.11244,1.0,1680.0,2.0,1.0,17.0,20.0,1.0)) I checked several times and this intruction seams to have the right=20 syntax but R asks me to finish my instruction (I need to add two=20 parenthesis at the end so that it can be evaluated, but do not give me=20 the right results). I replaced the factors vector by its size (the morris method allows=20 that) and the evaluation is ok (with right results). I tryed also replacing the binf and bsup vectors by a single value=20 (authorized by the morris function also), leaving the factors vector,=20 and the evaluation is also ok (so it is not the factors vector that is=20 creating the problem). This seems really odd to me and I cannot see where is the problem so I=20 am thinking about a R bug (even if the sensitivity package is not=20 loaded, i cannot enter the instruction, thus it is not a sensitivity=20 problem). Did somebody already encountered such a bug (if it is a bug) ? I am using R 2.9.2 under linux/Xubuntu 9.10 and this has also been tried on R 2.9.0 on Windows 7. I can provide more info if needed. Jean Couteau Code Lutin
Duncan Murdoch
2009-Nov-30 22:25 UTC
[Rd] Bug in R evaluating a huge instruction (PR#14096)
On 30/11/2009 10:50 AM, couteau at codelutin.com wrote:> Hello, > > I do not know if i am facing a bug or a mistake (and if it is a bug i do > > not know in which category I can put it on the bug tracker), so I post=20 > my message here. > > I am trying to use the Morris function from the sensitivity package (but > > that is not the problem). I created a (big) instruction that should=20 > generate a morris object in which there is a data.frame i am interested=20 > in. My instruction is : > > a<-morris(model=3DNULL,factors=3Dc("PecheAmateurs=20 > d=E9cembre.proportionMetier","PechePetitMetierMer=20Your 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