Preparing: covr
Preparing: cyclocomp
Preparing: description
Preparing: lintr
Preparing: namespace
Preparing: rcmdcheck
โโ GP sptotal โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
It is good practice to
โ write unit tests for all functions, and all package code in
general. 43% of code lines are covered by test cases.
R/AIC.slmfit.R:17:NA
R/AIC.slmfit.R:18:NA
R/coef.slmfit.R:14:NA
R/coef.slmfit.R:15:NA
R/coef.slmfit.R:16:NA
... and 503 more lines
โ omit "Date" in DESCRIPTION. It is not required and it gets
invalid quite often. A build date will be added to the package when
you perform `R CMD build` on it.
โ 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 '<-'.
inst/scripts/create_simulated_data.r:4:4
inst/scripts/create_simulated_data.r:12:5
inst/scripts/create_simulated_data.r:18:4
inst/scripts/create_simulated_data.r:20:4
inst/scripts/create_simulated_data.r:22:4
... and 22 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
R/AIC.slmfit.R:5:81
R/AIC.slmfit.R:6:81
R/data.R:27:81
R/data.R:32:81
R/data.R:39:81
... and 114 more lines
โ 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/slmfit.R:214:15
R/slmfit.R:216:17
R/slmfit.R:216:40
โ 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.
inst/scripts/create_simulated_data.r:38:58
inst/scripts/create_simulated_data.r:41:58
R/utils.R:101:15
vignettes/sptotal-vignette.Rmd:178:17
vignettes/sptotal-vignette.Rmd:471:21
โ not import packages as a whole, as this can cause name
clashes between the imported packages. Instead, import only the
specific functions you need.
increasing test coverage, replacing 1: iterators, and cleaning up/reducing the imports (if possible) seem important to me, the rest is mroe or less cosmetic...