In R, I want to get an idea of what I can do with a particular class (specifically, the "Mart" class from the "biomaRt" package in BioConductor). I would like to see all the methods that are defined for this class. Is there a way to do this?
Note: The methods
function does not do what I want. That function lists all the classes for which a specific method is defined, not all the methods defined for a class.
Ah, but methods
does do what you want. Read ?methods
carefully and you will see the class=
argument is what you're looking for.
require(zoo)
methods(class="zoo")
S4 classes are similar, but you need to use showMethods
instead.
require(timeSeries)
showMethods(classes="timeSeries")
If your class is an S3 class then you use the methods function, but specify the class argument.
If it is an S4 class then use showMethods.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With