r - Looking at internal Methods -
i'd able see function that's used when use str(), i'd modify bit own purposes function.
when type str()
, following:
function (object, ...) usemethod("str") <environment: namespace:utils>
so tried, getanywhere(str)
:
2 differing objects matching ‘str’ found in following places .globalenv package:utils namespace:utils use [] view 1 of them
but there's nothing in documentation syntax should using []
so tried, getanywhere(str)[1]
:
function (object, ...) usemethod("str") <environment: namespace:utils>
sigh. allright, showmethods(str)
:
function "str": <not generic function>
so, how see construction of output str()
? or can i?
you want methods()
s3 generic such str()
:
> methods(str) [1] str.data.frame* str.date* str.default* [4] str.dendrogram* str.loglik* str.posixt* non-visible functions asterisked
using getanywhere(str)
not helpful because str()
visible same result if run str
@ prompt. need getanywhere()
@ hidden methods listed above:
getanywhere(str.default)
for example.
shame need know kind of generic function list methods; seems user-friendliness improved if r didn't care kind of method type supplied 1 or other of these functions.
Comments
Post a Comment