Hi! I was reading through the codebase and noticed a small bug and a few typos scattered across the source and docs.
Bug: implemented_is_methods called without parentheses
In R/importance_sampling.R (line 117), implemented_is_methods is referenced without () inside the paste0() call:
paste0(implemented_is_methods, collapse = "', '")
Since implemented_is_methods is a function (defined on line 121), this pastes the function object's string representation instead of the actual method names ("psis", "tis", "sis"). The check on line 113 correctly uses implemented_is_methods() with parentheses, but the error message construction doesn't.
Typos in documentation (roxygen + .Rd files)
While reading through the code I also spotted a handful of typos:
| File |
Typo |
Fix |
R/diagnostics.R (line 14) |
"dependend" |
"dependent" |
R/diagnostics.R (line 433) |
"dependend k-ht" |
"dependent k-hat" |
R/loo-glossary.R (line 10) |
"The pages provides definitions to" |
"The page provides definitions of" |
R/split_moment_matching.R (line 24) |
"log-likeliood" |
"log-likelihood" |
R/loo_subsample.R (line 420) |
"subampled" |
"subsampled" |
R/loo_compare.psis_loo_ss_list.R (line 34) |
"comaprison" |
"comparison" |
R/loo_model_weights.R (line 10) |
"matrices or , one for each" |
"matrices, one for each" |
R/loo-package.R (line 85) |
"widely application" |
"widely applicable" |
The corresponding .Rd man pages have the same typos (generated from roxygen).
Happy to submit a PR for these if that would be helpful!
Hi! I was reading through the codebase and noticed a small bug and a few typos scattered across the source and docs.
Bug:
implemented_is_methodscalled without parenthesesIn
R/importance_sampling.R(line 117),implemented_is_methodsis referenced without()inside thepaste0()call:Since
implemented_is_methodsis a function (defined on line 121), this pastes the function object's string representation instead of the actual method names ("psis","tis","sis"). The check on line 113 correctly usesimplemented_is_methods()with parentheses, but the error message construction doesn't.Typos in documentation (roxygen + .Rd files)
While reading through the code I also spotted a handful of typos:
R/diagnostics.R(line 14)R/diagnostics.R(line 433)R/loo-glossary.R(line 10)R/split_moment_matching.R(line 24)R/loo_subsample.R(line 420)R/loo_compare.psis_loo_ss_list.R(line 34)R/loo_model_weights.R(line 10)R/loo-package.R(line 85)The corresponding
.Rdman pages have the same typos (generated from roxygen).Happy to submit a PR for these if that would be helpful!