Hi there. I am trying to find a way to get a specific list of the additional parameters that are specified within the ...
argument of a function inside a library. How do you do that?
In particular I would like to know the parameters accepted by the function viewPathway
inside the ReactomePA package. By typing formals(viewPathway)
I get:
$pathName
$organism
[1] "human"
$readable
[1] TRUE
$foldChange
NULL
$keyType
[1] "ENTREZID"
$layout
[1] "kk"
$...
How do I get a list of those $...
?!?!? It is important because the function creates a plot and it would be useful to know the parameters in order to adjust the look of the plot according to my needs.
Thanks a lot guys
Luca
Also, this is just a basic R question, not really pertaining to Bioconductor, so in the future you should ask about basic R stuff on r-help@r-project.org or maybe stackoverflow.com
To add to this already detailed answer:
Perhaps the OP was wondering how to interrogate what arguments were actually passed into the function and caught by
...
. In this case you could convert...
into named list and examine it that way:Then calling it like so:
Will give you
Thanks @James and @Steve. I knew the meaning of the ellipses argument, it just seemed "stupid" to me that there was no way to interrogate a function to explicitly state the arguments that the function accepts in its ellipses. Anyway, from what I understand from your explanation, the only way to do that is to look at the code. I will try. Thanks again