You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[upstream rENA 0.3.1] Regression axes named after the first edge, not the predictor #2
This is an issue in rENA 0.3.1, not in ena-python. It is tracked here because it came out of porting rENA to Python. Reported as an observation, not an accusation — it may be fixed upstream or intended, in which case please correct me. Full write-up: docs/rena-upstream-issues.md
Summary
ena.rotate.by.hena.regression names its rotation axes after the first edge rather than the predictor. With both x_var and y_var, both columns get the same name.
Severity: low — cosmetic, but produces duplicate column names.
colnames(ena.rotate.by.hena.regression(set, list(x_var="V ~ score"))$rotation)
#> [1] "A & B_reg" "SVD2" "SVD3" "SVD4" "SVD5" "SVD6"# ^ expected "score_reg"
colnames(ena.rotate.by.hena.regression(set,
list(x_var="V ~ score", y_var="V ~ grp"))$rotation)
#> [1] "A & B_reg" "A & B_reg" "SVD3" "SVD4" "SVD5" "SVD6"# ^ both axes get the same name
Root cause
ena.rotate.by.regression.R:75 derives the name with xName <- all.vars(x)[2], which assumes x is a formula object. params$x_var is a character string, and all.vars() on a string returns nothing:
all.vars("V ~ score") #> character(0) -> all.vars(x)[2] is NA
all.vars(as.formula("V ~ score")) #> [1] "V" "score"
So is.na(all.vars(x)[2]) is always TRUE and the branch falls back to xName <- names(v1)[1] — the first edge name. Line 121 does the same for yName, so with both axes the columns collide.
Suggested fix
Coerce first, e.g. all.vars(as.formula(x))[2].
What ena-python does
Names the axis after the predictor (score_reg, grp_reg). Names are cosmetic and the vectors match, so ena-python does not reproduce this.
The report there pins its source references to rENA main @ a09a4b20, verified byte-identical to the released 0.3.1 this was found against — so it applies to their current tree, not just the CRAN build.
This issue stays open here as ena-python's record of the divergence; it can close when the upstream one resolves.
Activity
HUDongpin commentedon Jul 16, 2026
Reported upstream: rENA #50 (2026-07-16).
The report there pins its source references to rENA
main@a09a4b20, verified byte-identical to the released 0.3.1 this was found against — so it applies to their current tree, not just the CRAN build.This issue stays open here as ena-python's record of the divergence; it can close when the upstream one resolves.