Hi Alok -- On 03/11/2010 06:59 PM, Alok Jadhav wrote: > > 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"
showMethods(QueryAgora, classes="au", includeDef=TRUE) or selectMethod(QueryAgora, "au") Martin > >> 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 > > > -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.