On Thu, Oct 28, 2010 at 1:21 PM, Paul Shannon
<pshannon@systemsbiology.org>wrote:

> I have a specific rtracklayer question, and a general S4/help question.
>
> The specific question:  Michael helpfully suggested  the 'viewLimits'
> parameter to the rtracklayer track method, saying
>
>     This is another track line parameter, called viewLimits. See
> class?GraphTrackLine.
>     track (session, "wiggle", viewLimits = c(0, 100)) <- wiggle
>
> Indeed, class?GraphTrackLine mentions that parameter.
>
> But when I call this method (or what I *think* is this method), I get this:
>
>    unused argument(s) (viewLimits = c(80, 100))
>
> That's my specific question.   How do I supply viewLimits information to
> the track method?
>
>
Could you please provide a reproducible example? I cannot reproduce with a
simple test, and really the arguments are not interpreted in a way that
would result in that error.


> The general question is:  how do I navigate the help system, with S4
> objects and methods, so I can figure this stuff out for myself?
>
> With R functions, I can type
>
>   args (track)
>
>
Note that this is not the same function that is called in the code listed
above. There is a difference between track and track<-. One gets, the other
sets/replaces.


> or simply
>
>   track
>
> and see, respectively, the parameters and the contents of the body of the
> function.
>
> But with generics, args (track) gets me
>
>   function (object, ...)
>   NULL
>
> and then, looking for the definition, I do this (knowing, of course that it
> won't work):
>
>  > track
>    standardGeneric for "track" defined from package "rtracklayer"
>    function (object, ...)
>    standardGeneric("track")
>    <environment: 0x10b69b340>
>    Methods may be defined for arguments: object
>    Use  showMethods("track")  for currently available ones.
>
>  > showMethods ('track')
>    Function: track (package rtracklayer)
>    object="UCSCSession"
>    object="UCSCTableQuery"
>
>
> Is there something like this I should call?
>
>   args (track (object='UCSCSession'))
>
> Better yet -- is there a 'R help for S4 classes, objects and methods'
> tutorial somewhere?
>
>

Not really. But selectMethod() is useful, as it will return the method that
would be invoked for a given signature. It's a little more convenient than
getMethod(), mentioned by Vince, because selectMethod() considers
inheritance. Same basic usage though.


Thanks!
>
>  - Paul
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

