Fix undefined table parameter in report_effectsize.htest() - #510
Conversation
Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
.report_effectsize_ttest called without proper table|
@copilot test-report.htest-correlation.R is failing ── Error (test-report.htest-correlation.R:3:3): report.htest-correlation ───────
<notSubsettableError/error/condition>
Error in `table[[estimate]]`: object of type 'closure' is not subsettable
Backtrace:
▆
1. ├─report::report(cor.test(iris$Sepal.Width, iris$Sepal.Length)) at test-report.htest-correlation.R:3:3
2. └─report:::report.htest(cor.test(iris$Sepal.Width, iris$Sepal.Length)) at report/R/report.R:101:3
3. ├─report::report_table(x, model_info = model_info, ...) at report/R/report.htest.R:29:3
4. └─report:::report_table.htest(x, model_info = model_info, ...) at report/R/report_table.R:62:3
5. ├─base::do.call(report_effectsize, call_args) at report/R/report.htest.R:150:3
6. ├─report (local) `<fn>`(`<htest>`, table = `<prmtrs_m[,11]>`, model_info = `<named list>`)
7. └─report:::report_effectsize.htest(...) at report/R/report_effectsize.R:43:3
8. └─report:::.report_effectsize_correlation(x, dot_args) at report/R/report.htest.R:95:5
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ] |
Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
... Fixed in commit a288c04. The issue was that in |
|
@copilot thanks can you also fix all package lints (use config file at root including object overwrite linter) |
Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
Fixed in commit 9752938. All object_overwrite_linter warnings have been resolved by renaming local |
tableparameter from all internal effectsize function callsLinting Fixes
Fixed all
object_overwrite_linterwarnings by renaming localtablevariables in the internal effectsize functions to avoid overwritingbase::table:Changes made:
R/report_htest_chi2.R: Renamedtable→es_tableandresult_tableR/report_htest_cor.R: Renamedtable→result_tableR/report_htest_fisher.R: Renamedtable→es_tableandresult_tableR/report_htest_ttest.R: Renamedtable→es_tableandresult_tableR/report_htest_wilcox.R: Renamedtable→wilcox_tableandresult_tableAll htest effectsize functions continue to work correctly and all tests pass. The only remaining lint warnings are for missing suggested packages in vignettes (dplyr, lme4), which is expected in development environments.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.