Stop run_psa dropping the first parameter column
维护者通常 1 天内回复
评估
调研方向
Start with make_psa_obj(parameters = psa_samp[, -1]) at R/run_psa.R:121 and the FUN validity guard near R/run_psa.R:47, and check how gen_psa_samp() builds the nsamp index column. The issue asks for the leading column to be dropped only when it is that index column, and for the guard to raise 'FUN is not well defined' via a tryCatch success flag. Done means new cases in tests/testthat/test_run_psa.R pass for a hand-built psa_samp and a misdefined FUN, and the audit repro is re-run on the branch.
由索引模型根据 Issue 内容生成。
描述
Goal
run_psa calls make_psa_obj(parameters = psa_samp[, -1]) unconditionally, so a hand-built psa_samp silently loses its first real parameter from $parameters and $parnames even though that parameter still drives FUN and the computed outcomes. Separately, the FUN-validity guard in the same file is dead code — is.na(sum(is.na(x))) is always FALSE, so the intended friendly error never fires.
Scope
- At
R/run_psa.R:121, drop the leading column only when it is thensampindex column thatgen_psa_samp()prepends - At
R/run_psa.R:47, replace the inert guard with atryCatchsuccess flag soFUN is not well definedis actually raised - Add regression tests in
tests/testthat/test_run_psa.Rfor a hand-builtpsa_sampand for a misdefinedFUN - Re-verify the audit repro on-branch before applying the proposed diff — this fix was reasoned from root cause, not re-run to green
Version: #172
- 主要语言
- R
- 星标
- 43
- 派生
- 14
- 平均合并
- 4 小时 44 分钟
- 30 天内合并 PR
- 15
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DARTH-git/dampack 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
release
难度 5/5 一周以上 新手友好度 20/100
维护者通常 1 天内回复
-
documentation release
难度 3/5 1-2 天 新手友好度 25/100
维护者通常 1 天内回复
-
documentation
难度 3/5 1-2 天 新手友好度 58/100
维护者通常 1 天内回复
查看 DARTH-git/dampack 的全部 Issue
相似的 Issue
-
documentation priority: low
难度 2/5 1-3 小时 新手友好度 70/100
Pascal-Kueng/dyadMLM#179 ·
维护者通常 1 天内回复
-
Consider changes未关闭
难度 2/5 1-3 小时 新手友好度 68/100
OHDSI/OmopSketch#618 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
-
bug exec:agent status:fix-merged
难度 2/5 1-3 小时 新手友好度 72/100
ichirio/rtfreporter#1046 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复