-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[R] improve docstrings for "xgb.Booster.R" #9906
Conversation
cc @david-cortes . |
Hi @mayer79 , thank you for the work on using markdown syntax, could you please take a look into the CI failures? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, would be great if @david-cortes could help take a look as well.
Unrelated note, would be interesting if roxygen can output markdown without converting it into rd, we can plug the document into sphinx then XGBoost's document site can display R API just like the Python API. |
I don't know if that's possible, but looks like the R docs can otherwise be rendered as a similar-looking HTML (don't know how though). For example, lightgbm has a page for R docs which is auto-generated from the roxygen code: https://lightgbm.readthedocs.io/en/latest/R/reference/ |
In what .rd file is it? The aim of this and upcoming PRs is definitively to also fix things liket his. |
That particular screenshot was from |
We can convert Rmd files into md files, then consume it using sphinx using knit, just wondering if that's possible with Rd files as well. Not important at this point, just something nice to have in the future. Apologies for the distraction. |
There is a git pages workflow that uses the {pkgdown} package to generate HTML files. Here is an example such a help page of such a function: https://modeloriented.github.io/shapviz/reference/sv_dependence.html The translation happens via |
@david-cortes : I will go over this help file in the next PR. Hope to fix the majority of such things as well. |
Thank you for sharing, I will look into it. |
This PR introduces Markdown docstrings. It is the first step towards #9875.
To keep the PR not overly large, the changes are focussing on the file "xgb.Booster.R" which mainly contains the
predict()
function.Besides switching to Markdown, I am also cleaning small inconsistencies in the docstrings, change some wordings, and format some examples a bit neater.
Quite unrelated, the third commit removes a warning in an example related to an inexisting parameter
silent
.I am aware that such reviews cost time. At least, I am not changing anything in the functions.