We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Eliminate all those variables that are assigned, read or not, but that do not affect the value returned by the function.
For example:
foo <- function() { a <- 8818 b <- 0 c <- 1000 res <- 0 for (b < c) { b <- b + 1 res <- res + b } return(a ^ 2) }
Would be equivalent to:
foo <- function() { a <- 8818 return(a ^ 2) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Eliminate all those variables that are assigned, read or not, but that do not affect the value returned by the function.
For example:
Would be equivalent to:
The text was updated successfully, but these errors were encountered: