可能重复:
R:显示包中 S4 函数的源代码
我下载了一个包 ( GEOquery
) 并正在使用其中的一些功能。其中一个叫做Table
,据我了解,它能够将S4
数据集制成表格。
例如
> summary(GDS2853) # GDS2853 is a dataset I downloaded from NCBI
Length Class Mode
1 GDS S4
getAnywhere(Table)
节目
> 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"
我想学习的代码,Table
以便我可以知道如何将 GDS 数据集制成表格,data.frame
并且as.list
不能强制S4
上课 - 尽管我可以通过例如,将 GDS 数据集制成表格,
GDS_table=Table(GDS2853)[1:20000,1:20] #GDS2853 contains 20 columns
and approx 17000 rows
我尝试了getMethods
其他帖子中建议的方法,但以下是我得到的
> getMethod("Table")
Error in getMethod("Table") :
No method found for function "Table" and signature
我还尝试通过输入来指定“位置”,package=:GEOquery
但显然package
是一个未使用的参数。
想知道我做错了什么,以至于看不到Table
.