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
I'm looking at the code for layout_as_dynamic and see many loops similar to this:
for(i in 1:length(gList)){
This is risky in R, because if gList is an empty list, the loop will execute twice!
gList
> for(i in 1:length(list())) print(i) [1] 1 [1] 0
In general it's safer to use R's seq_along.
seq_along
Noted as part of openjournals/joss-reviews#5238
The text was updated successfully, but these errors were encountered:
This has been on my last far too long, thanks for calling it out.
Sorry, something went wrong.
replaced 1:length with seq_along (#55)
7667e30
No branches or pull requests
I'm looking at the code for layout_as_dynamic and see many loops similar to this:
This is risky in R, because if
gList
is an empty list, the loop will execute twice!In general it's safer to use R's
seq_along
.Noted as part of openjournals/joss-reviews#5238
The text was updated successfully, but these errors were encountered: