Documentation fixes for paste.Rd and substr.Rd#223
Documentation fixes for paste.Rd and substr.Rd#223aakritixyz wants to merge 3 commits intor-devel:mainfrom
Conversation
|
The bullet-point list mentions 'Explained recycle0 behavior when collapse is specified.' for paste.Rd but as far as I can tell, you did not change the explanation about recycle0? |
|
The examples added to substr.Rd are useful, but the comment '## Demonstrating zero-length extraction behavior' is misleading: 'character(0)' in the first example indeed is zero-length, but '""' in the second example has length 1, even though it contains zero characters: length("") == 1 but nchar("") == 0. |
|
Hi Sir Thanks for your feedback! I apologize for not including the changes you suggested in my previous commit , I realized after pushing that I had only partially staged the updates, so the examples and comments weren’t fully updated. I’ve now incorporated your suggestions: Both changes are included in the latest commit. PTAL , thanks! |
|
No problem! However, I would not add the examples in paste.Rd, since there are already examples showing the use of 'collapse' and 'recycle0' (below the headings ## 'recycle0 = TRUE' and '## When 'collapse = '). |
|
Thanks for the clarification! No new examples are added now, and the documentation remains unchanged functionally. Please let me know if this looks good or if you’d prefer a different approach. |
|
Looks good to me, but you'll have to wait for a response of one of the R maintainers. I'm just a fellow-coder who saw your remark in the R-contributers Slack. |
|
Thanks for taking a look and for the helpful guidance! |
|
To get feedback from R maintainers the patch should be submitted to either r-devel. In any case, I would submit to bugzilla as there it has less chances of being forgotten. |
|
@llrs That makes sense regarding visibility and the usual workflow for R. For now, I mainly wanted to get initial feedback and ensure the documentation changes were aligned with expectations, so I started with a GitHub PR. Based on the guidance here, I’ll follow up via the appropriate channel (r-devel / Bugzilla) if further action is needed. Thanks again for the helpful advice and for pointing me in the right direction. |
AFAIK mailman is configured to strip attachments. Bugzilla is clearly preferred by the R Core team. |
This PR includes minor documentation improvements to base R functions:
1. paste.Rd
• Clarified why paste0() is slightly more efficient than paste().
• Explained recycle0 behavior when collapse is specified.
2. substr.Rd
• Added a note about zero-length extraction: when start or stop results in zero-length, an empty string "" is returned.
• Updated examples to demonstrate zero-length behavior.
These changes improve clarity for users reading the documentation, without modifying any code behavior.