You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the goodpractice package to run some automated code checks of sdmbench. Below are some super minor style/robustness issues it flagged that you could change if you wanted to.
On two lines (here and here) you used = for assignment, instead of <- which you used everywhere else.
On quite a few lines of the shiny server file there are more than 80 characters per line, which makes it a bit difficult to read (particularly here). It would be worth reformatting that code to have shorter lines
On this line of the shiny server, you used the code pattern: 1:length(x), but seq_along(x) is (very mildly) preferable (in general), since in the case x has length 0 (e.g. an empty list), 1:length(x) returns c(1L, 0L), but seq_along returns integer(0).
That's all it found though, and these are very minor, which is great! I run those checks on packages quite regularly, and the reports are rarely as short as that.
The text was updated successfully, but these errors were encountered:
I implemented the changes, hope the code is more readable now. Thanks a lot for letting me know about the goodpractice package - I will have a look and start using it. I changed the code pattern as well, I didn't know it worked this way, thanks!
I used the goodpractice package to run some automated code checks of sdmbench. Below are some super minor style/robustness issues it flagged that you could change if you wanted to.
On two lines (here and here) you used
=
for assignment, instead of<-
which you used everywhere else.On quite a few lines of the shiny server file there are more than 80 characters per line, which makes it a bit difficult to read (particularly here). It would be worth reformatting that code to have shorter lines
On this line of the shiny server, you used the code pattern:
1:length(x)
, butseq_along(x)
is (very mildly) preferable (in general), since in the casex
has length 0 (e.g. an empty list),1:length(x)
returnsc(1L, 0L)
, butseq_along
returnsinteger(0)
.That's all it found though, and these are very minor, which is great! I run those checks on packages quite regularly, and the reports are rarely as short as that.
The text was updated successfully, but these errors were encountered: