Possible duplicate:
R: show source code of function S4 in package
I downloaded the package ( GEOquery ) and played with some of the features. One of them is called Table , which, as far as I know, is able to tabulate the S4 dataset.
eg.
> summary(GDS2853)
getAnywhere(Table) shows
> getAnywhere(Table) A single object matching 'Table' was found It was found in the following places package:GEOquery namespace:GEOquery with value function (object) standardGeneric("Table") <environment: 0x06ad5268> attr(,"generic") [1] "Table" attr(,"generic")attr(,"package") [1] "GEOquery" attr(,"package") [1] "GEOquery" attr(,"group") list() attr(,"valueClass") character(0) attr(,"signature") [1] "object" attr(,"default") `\001NULL\001` attr(,"skeleton") function (object) stop("invalid call in method dispatch to \"Table\" (no default method)", domain = NA)(object) attr(,"class") [1] "standardGeneric" attr(,"class")attr(,"package") [1] "methods"
I would like to know the Table code so that I can know how to tabulate a GDS dataset, since data.frame and as.list cannot force the S4 class - although I can insert GDS dataset tables, for example,
GDS_table=Table(GDS2853)[1:20000,1:20]
I tried getMethods , as suggested in other posts, but below is what I got
> getMethod("Table") Error in getMethod("Table") : No method found for function "Table" and signature
I also tried specifying βwhereβ by inserting package=:GEOquery , but apparently package is an unused argument.
Interestingly, what I did wrong was to not see the source code for Table .