How to check all the arguments of a function in R

前端 未结 1 1234
一向
一向 2021-01-14 04:33

Usually in html help of a package in R argument list, ends with

........ other arguments passed.

but how can we print all the

相关标签:
1条回答
  • 2021-01-14 04:41

    If I understand your question correctly, then I tend to say: Most of the time, it is not possible to list all the possible arguments that may be passed under the ... 'section' of the function.

    Please look at the very simple ?plot function. There, only two arguments, x and y are given on the help page. However, under ... there is a range of additional possible arguments. Most of them are (as the help page says) graphical parameters. In the ?lm case, I understand that the arguments in ... are passed to lm.fit and lm.wfit. Check those help pages to see which parameters these functions take.

    I guess the main problem is that you have to check ALL functions, that arguments under ... may be passed to, to know ALL the possible arguments that may be passed under .... Since the number of functions may be very large, also the number of arguments working in ... may be very large. So we don't want to have them on the "top-level" help page.

    I hope that made any sense...

    0 讨论(0)
提交回复
热议问题