[R-sig-finance] (i) bug report in listFinCenter and (ii) question

Andrew Piskorski atp at piskorski.com
Thu Oct 6 03:16:28 CEST 2005


On Tue, Oct 04, 2005 at 02:46:20PM -1000, Parlamis Franklin wrote:

>    (i) The function 'listFinCenter' in the fCalendar package does  
> not work.  Having checked the code of that function it appears the  
> problem is in the passing of the '*' regular expression pattern to  
> the R grep function.  R complains that this is not a valid regular  
> expression.  I am not sure whether this bug is the result of more  

>     In any event, I have found that replacing the pattern '*' with  
> the pattern '.*' will do the trick (although I must admit the entire  

Well, that's quite correct, '*' is typically NOT a valid regular
expression at all.  That probably varies by regexp library (and I'm
not sure what the spec'd POSIX behavior is).  But in any regexp
library where '*' IS a valid regexp, it's going to match the literal
character '*' - AKA, it is equivalent to the regular expression '\*'
or '[*]'.

So which did the author intend, greping for '[*]', or for '.*'?  The
results will be very different.  Either way, using plain '*' is a bad
idea.

-- 
Andrew Piskorski <atp at piskorski.com>
http://www.piskorski.com/



More information about the R-sig-finance mailing list