From j.van_den_hoff at fzd.de  Fri Oct 30 15:34:41 2009
From: j.van_den_hoff at fzd.de (Joerg van den Hoff)
Date: Fri, 30 Oct 2009 15:34:41 +0100
Subject: [Rd] bug in `pmatch' (error with too long 'choices')?
Message-ID: <20091030143441.GP5131@marco.fz-rossendorf.de>


I observed the following:

match.arg("white", colors()) 

yields 'white', but

match.arg("whit", colors())

yields:

`Error in match.arg("whit", colors()) : 
  'arg' should be one of "white", "aliceblue", '...

this message actually comes from `pmatch'. using a suitable subset of
`colors()' works OK. the precise length were the error occurs seems to
depend on `arg' and `choices'. e.g.

match.arg("whit", colors()[1:650])

works

but the limit seems not be fixed. in another setting it
happend around a length of `choices' of around 130. maybe a memory management related
bug? or am I missing something?

regards,
joerg



platform       powerpc-apple-darwin8.11.1  
arch           powerpc                     
os             darwin8.11.1                
system         powerpc, darwin8.11.1       
status                                     
major          2                           
minor          9.2                         
year           2009                        
month          08                          
day            24                          
svn rev        49384                       
language       R                           
version.string R version 2.9.2 (2009-08-24)



[Rd] bug in `pmatch' (error with too long 'choices')?
Joerg van den Hoff