Possible Duplicate:
R: show source code of an S4 function in a package
I downloaded a package (GEOquery
) and was playing with some of the functions. One of them is called Table
, which, to my understanding, is able to tabulate an S4
dataset.
E.g.
> summary(GDS2853) # GDS2853 is a dataset I downloaded from NCBI
Length Class Mode
1 GDS S4
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'd like to learn the code of Table
so that I could know how to tabulate a GDS dataset, as data.frame
and as.list
couldn't coerce an S4
class - although I could tabulate GDS dataset by, for example,
GDS_table=Table(GDS2853)[1:20000,1:20] #GDS2853 contains 20 columns
and approx 17000 rows
I tried the 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 to specify the "where" by putting in package=:GEOquery
but apparently package
is an unused argument.
Wonder what I did wrong so as to fail to see the source code for Table
.