ropensci / rrricanes

Web scraper for Atlantic and east Pacific hurricanes and tropical storms
https://docs.ropensci.org/rrricanes
Other
21 stars 12 forks source link

Fix issues identified by gooodpractice::gp() #163

Closed elinw closed 1 year ago

elinw commented 2 years ago

Here are some to start ... for right now let's not worry about the test coverage and focus instead on the code in the .R files.

✖ use '<-' for assignment instead of '='. '<-' is the standard, and R users and developers are used it and it is easier to read your code for them if you use '<-'.

R/scrapers.R:214:11

✖ avoid long code lines, it is bad for readability. Also, many people prefer editor windows that are about 80 characters wide. Try make your lines shorter than 80 characters

R/data.R:22:1
R/data.R:26:1
R/data.R:30:1
R/fstadv.R:97:1
R/fstadv.R:275:1
... and 43 more lines

✖ avoid 1:length(...), 1:nrow(...), 1:ncol(...), 1:NROW(...) and 1:NCOL(...) expressions. They are error prone and result 1:0 if the expression on the right hand side is zero. Use seq_len() or seq_along() instead.

elinw commented 2 years ago

@GOAM001 fixed the 1:length() issue.
https://github.com/ropensci/rrricanes/blob/main/R/base.R#L194 Is also simple. Then there are a lot of long lines.