[R] generic function body display

Alok Jadhav alok.jadhav at credit-suisse.com
Fri Mar 12 03:59:57 CET 2010


I recently restructured my R project to make use of S4 class objects. I
converted some of the functions to generic functions. If I type the name of
the function i can see the body for non generic functions. I am not able to
retrieve the code for Generic functions. It is very convinient for users to
use these functions when they can see the function body.

See the output for generic function "QueryAgora" which is defined for
classes "jp", "hk", "au", "kr"


> QueryAgora
standardGeneric for "QueryAgora" defined from package ".GlobalEnv"

function (object, sql, ..., uat = FALSE, gen2 = FALSE, as.is = FALSE) 
standardGeneric("QueryAgora")
<environment: 0x029b84cc>
Methods may be defined for arguments: object, sql, uat, gen2, as.is
Use  showMethods("QueryAgora")  for currently available ones.


> showMethods("QueryAgora")
Function: QueryAgora (package .GlobalEnv)
object="au"
object="hk"
object="jp"
object="kr"

> showMlist(MethodsList("QueryAgora"))
<Empty Methods List>

> showMlist(MethodsList("jp"))
<Empty Methods List>

Could someone please tell me how can I explore the function body for the
above function. Any help will be appreciated.


Regards, Alok



-- 
View this message in context: http://n4.nabble.com/generic-function-body-display-tp1590075p1590075.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list