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

Joerg van den Hoff j.van_den_hoff at fzd.de
Fri Oct 30 15:34:41 CET 2009

I observed the following:

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

yields 'white', but

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


`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])


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?


platform       powerpc-apple-darwin8.11.1  
arch           powerpc                     
os             darwin8.11.1                
system         powerpc, darwin8.11.1       
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)

More information about the R-devel mailing list