Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[R-package] All functions should have explicit return statements #3352
Comments
|
I am fairly new to R but with whatever I have learnt so far I believe I can be of some help here :) |
|
thanks @Juniper-23 ! I just assigned this to you so no one else will take it. It's not urgent so take your time. Let me know if you have any questions. |
|
@jameslamb Thanks! This would help :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Summary
In R, the
returnstatement is not strictly required in functions.This means that it can sometimes be difficult to understand, from looking at the code, what a function will return.
How to close this issue
To close this issue, make sure that every function in the R package is explicitly using a
returnstatement. The R package's code can all be found inR-package/R.For functions which look like they should not return anything, please add a new statement at the end:
How this improves LightGBM
This fix will make the R package a little bit more explicit, reducing the risk of mistakes during future development.