Closed aadler closed 1 year ago
Thanks for this PR @aadler. I am fine with large-scope PR such as this one but it is really up to you as well and to the time you have to dedicate to this. It seems all checks are successful so I am going to merge this PR unless you instruct me otherwise. Nice job, thanks a lot!
I got a bit carried away with the size of the PR again, but now I'm testing :) This PR includes a lot of changes, all of which are documented in the commit notes. There remain files which need to be reviewed as well as some potential enhancement which this code review has uncovered, so further PRs may be forthcoming. @astamm, please let me know if you prefer more frequent but smaller-scoped PRs or fewer but larger-scoped ones such as this. Thank you.
Below is a list of most of the changes. I will try and note which of Safety, Efficiency, or Cleaning to which each relates.
R_forceSymbols(info, TRUE)
to init (S)bibentry
and update to what is shown on NLOPT website (E/C)deqn
andeqn
calls innloptr
help documentation for nicer outputhin
andhinjac
) (E/C)any(is.na(
withanyNA(
(S/E)1:length(x)
withseq_along(x)
where x has not already been checked for length >= 1 (S)return
calls when implied.Primitive(return)
will suffice (E)paste
calls inside R message/error/warning calls (E)paste(., sep = "")
withpaste0
(E)=
being used for assignment with<-
(S)fixed = TRUE
forgrep
and family when comparing to fixed string (More efficient in R-devel) (E)value = TRUE
to subset grep calls instead of external explicit sub-setting along the logical (C)toString
instead ofpaste(., collapse = ", ")
(C)c()
containing only one item (E)