I ran goodpractice against optmatch out of curiosity. Results below. Some of these will be no action but others we can knock out easily.
[ ] write short and simple functions. These functions have
high cyclomatic complexity:fullmatch.BlockedInfinitySparseMatrix
(67), fullmatch.InfinitySparseMatrix (67), fullmatch.matrix (67),
fullmatch.optmatch.dlist (67).
[ ] not use "Depends" in DESCRIPTION, as it can cause name
clashes, and poor interaction with other packages. Use "Imports"
instead.
[x] add a "BugReports" field to DESCRIPTION, and point it to
a bug tracker. Many online code hosting services provide bug
trackers for free, https://github.com, https://gitlab.com, etc.
[x] 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 '<-'.
tests/testthat/test.InfinitySparseMatrix.R:106:6
tests/testthat/test.InfinitySparseMatrix.R:111:6
tests/testthat/test.InfinitySparseMatrix.R:122:6
tests/testthat/test.InfinitySparseMatrix.R:215:9
tests/testthat/test.InfinitySparseMatrix.R:216:12
... and 1 more lines
[ ] 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
inst/examples/caliper.R:26:1
inst/examples/fullmatch.R:7:1
inst/examples/fullmatch.R:14:1
inst/examples/fullmatch.R:23:1
inst/examples/fullmatch.R:24:1
... and 639 more lines
[ ] avoid the attach() and detach() functions, they are
fragile and code that uses them will probably break sooner than
later.
[x] avoid sapply(), it is not type safe. It might return a
vector, or a list, depending on the input data. Consider using
vapply() instead.
R/distUnion.R:34:12
R/distUnion.R:61:28
R/distUnion.R:62:28
R/distUnion.R:70:14
R/exactMatch.R:115:11
... and 33 more lines
[x] 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.
R/distUnion.R:46:11
R/distUnion.R:49:11
R/exactMatch.R:202:10
R/exactMatch.R:203:10
R/makedist.R:117:30
... and 11 more lines
[x] not import packages as a whole, as this can cause name
clashes between the imported packages. Instead, import only the
specific functions you need.
[ ] fix this R CMD check WARNING: LaTeX errors when creating
PDF version. This typically indicates Rd problems. LaTeX errors
found:
[x] avoid 'T' and 'F', as they are just variables which are
set to the logicals 'TRUE' and 'FALSE' by default, but are not
reserved words and hence can be overwritten by the user. Hence,
one should always use 'TRUE' and 'FALSE' for the logicals.
I ran goodpractice against optmatch out of curiosity. Results below. Some of these will be
no action
but others we can knock out easily.[ ] write short and simple functions. These functions have high cyclomatic complexity:fullmatch.BlockedInfinitySparseMatrix (67), fullmatch.InfinitySparseMatrix (67), fullmatch.matrix (67), fullmatch.optmatch.dlist (67).
[ ] not use "Depends" in DESCRIPTION, as it can cause name clashes, and poor interaction with other packages. Use "Imports" instead.
[x] add a "BugReports" field to DESCRIPTION, and point it to a bug tracker. Many online code hosting services provide bug trackers for free, https://github.com, https://gitlab.com, etc.
[x] 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 '<-'.
tests/testthat/test.InfinitySparseMatrix.R:106:6 tests/testthat/test.InfinitySparseMatrix.R:111:6 tests/testthat/test.InfinitySparseMatrix.R:122:6 tests/testthat/test.InfinitySparseMatrix.R:215:9 tests/testthat/test.InfinitySparseMatrix.R:216:12 ... and 1 more lines
[ ] 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
inst/examples/caliper.R:26:1 inst/examples/fullmatch.R:7:1 inst/examples/fullmatch.R:14:1 inst/examples/fullmatch.R:23:1 inst/examples/fullmatch.R:24:1 ... and 639 more lines
[ ] avoid the attach() and detach() functions, they are fragile and code that uses them will probably break sooner than later.
tests/testthat/wishlist.scores.R:11:3 tests/testthat/wishlist.scores.R:13:3 tests/testthat/wishlist.scores.R:23:3 tests/testthat/wishlist.scores.R:26:3
[x] avoid sapply(), it is not type safe. It might return a vector, or a list, depending on the input data. Consider using vapply() instead.
R/distUnion.R:34:12 R/distUnion.R:61:28 R/distUnion.R:62:28 R/distUnion.R:70:14 R/exactMatch.R:115:11 ... and 33 more lines
[x] 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.
R/distUnion.R:46:11 R/distUnion.R:49:11 R/exactMatch.R:202:10 R/exactMatch.R:203:10 R/makedist.R:117:30 ... and 11 more lines
[x] not import packages as a whole, as this can cause name clashes between the imported packages. Instead, import only the specific functions you need.
[ ] fix this R CMD check WARNING: LaTeX errors when creating PDF version. This typically indicates Rd problems. LaTeX errors found:
[x] avoid 'T' and 'F', as they are just variables which are set to the logicals 'TRUE' and 'FALSE' by default, but are not reserved words and hence can be overwritten by the user. Hence, one should always use 'TRUE' and 'FALSE' for the logicals.
R/feasible.R:NA:NA R/fill.NAs.R:NA:NA R/fill.NAs.R:NA:NA R/zzzDistanceSpecification.R:NA:NA**