查看内置R包的来源[复制](View the source of an builtin R package [duplicate])
可能重复: 查看R包的来源
我想查看stats :: reorder的源代码。
这个答案似乎不适用于编译为字节码的内置包:
> stats::reorder function (x, ...) UseMethod("reorder") >bytecode: 0x103321718< >environment: namespace:stats<Possible Duplicate: View the source of an R package
I want to see the source code of stats::reorder.
This answer seems not apply to built in packages which are compiled to bytecode:
> stats::reorder function (x, ...) UseMethod("reorder") >bytecode: 0x103321718< >environment: namespace:stats<最满意答案
这与编译为字节码的重新排序无关,以及与它作为通用函数有关的所有内容。
我在这里的回答详细阐述了这一点。
但是,如果您想查看可以使用的代码,则需要专门针对这种情况
# Find what methods are available for reorder methods(reorder) # Attempt to check out the code for reorder.default reorder.default # Use getAnywhere to view code regardless of if it is exported getAnywhere(reorder.default)This has nothing to do with reorder being compiled to bytecode and everything to do with it being a generic function.
My answer here elaborates on this.
But specifically for this situation if you want to see the code you can use
# Find what methods are available for reorder methods(reorder) # Attempt to check out the code for reorder.default reorder.default # Use getAnywhere to view code regardless of if it is exported getAnywhere(reorder.default)
更多推荐
发布评论