Closed tdhock closed 3 years ago
also would be good to use more informative variable names (single/double letter names like j are potentially confusing)
for(param_index in seq_along(object@param_names)){
param_name <- object@param_names[[param_index]]
other_index <- 6 + (param_index - 1)*2
set(.....)
}
also when there are magic numbers like "6" in the code it would be good to provide a comment explaining where it comes from. can you please explain? or even better change the code so that it is obvious and comments are no longer needed?
number_of_SOMETHING <- 6
other_index <- number_of_SOMETHING + (param_index - 1)*2
Thanks @tdhock! It is much better now :)
great
hi @diego-urgell can you please change this code in the coef method
to
which should be more time/memory efficient. (your method using cbind involves re-allocating a new data table for every parameter, and this can be avoided)