Hello, How can I see a function called "+.dlm"?> methods("+")[1] +.Date +.dlm* +.POSIXt Non-visible functions are asterisked> getAnywhere("+.dlm")Error in grep(pattern, x, ignore.case, extended, value, fixed, useBytes) : invalid regular expression '+\.dlm' Thanks in advance, Giovanni -- Giovanni Petris <GPetris at uark.edu> Department of Mathematical Sciences University of Arkansas - Fayetteville, AR 72701 Ph: (479) 575-6324, 575-8630 (fax) http://definetti.uark.edu/~gpetris/
On 9/21/2007 12:16 PM, Giovanni Petris wrote:> Hello, > > How can I see a function called "+.dlm"? > >> methods("+") > [1] +.Date +.dlm* +.POSIXt > > Non-visible functions are asterisked >> getAnywhere("+.dlm") > Error in grep(pattern, x, ignore.case, extended, value, fixed, useBytes) : > invalid regular expression '+\.dlm' > > Thanks in advance, > Giovanni >This looks like a bug in getS3method. Since "+" has special meaning in the regular expression, it should be escaped, and it wasn't. I'll fix it. Duncan Murdoch
On 9/21/2007 12:16 PM, Giovanni Petris wrote:> Hello, > > How can I see a function called "+.dlm"? > >> methods("+") > [1] +.Date +.dlm* +.POSIXt > > Non-visible functions are asterisked >> getAnywhere("+.dlm") > Error in grep(pattern, x, ignore.case, extended, value, fixed, useBytes) : > invalid regular expression '+\.dlm'Oh, by the way: I'm assuming you're using the dlm package, and that's where +.dlm lives. If so you can see the definition by get("+.dlm", environment(is.dlm)) The "environment(is.dlm)" tells get to look in the private environment attached to the is.dlm function, which happens to be where "+.dlm" lives. Duncan Murdoch