Repository navigation
Conversation
The compiled objects src/*.o and src/HRM.dll were tracked in git. CRAN policy forbids binary executables in source packages, and they are regenerated on every build. - untrack src/HRM.dll, src/RcppExports.o, src/u_statistics.o (kept on disk) - .gitignore: add *.o, *.so, *.dylib, *.dll, *.Rcheck/, *.tar.gz, .claude/ - .Rbuildignore: fix the ^gitignore$ typo (matched nothing), add research/, cran-comments.md, .Rhistory, *.Rcheck, *.tar.gz
- inst/CITATION: citEntry() and personList() are deprecated; use bibentry() and c(). Add the DOI and switch the URL to https. - src/RcppExports.cpp: regenerated with a current Rcpp (adds the RCPP_USE_GLOBAL_ROSTREAM guard). - HRM.Rproj: ProjectId added by RStudio.
RGtk2 was orphaned and archived from CRAN on 2021-12-15. The GUI code had already been commented out in R/GUI.R, but hrm.GUI() in deprecated.R still called the now-nonexistent hrm_GUI(), which R CMD check flagged as 'no visible global function definition for hrm_GUI'. - delete R/GUI.R (dead, entirely commented out) and its Rd files - drop the hrm.GUI() stub from R/deprecated.R BREAKING CHANGE: hrm_GUI() and hrm.GUI() are removed.
The multivariate branch was reachable through hrm_test(..., variable = ), but its only unit test had every assertion commented out, so the code was shipping untested. Moved to research/ rather than deleted. - move R/MVHRM.R and tests/testthat/test_mv_1w_1s.R to research/ - drop the variable= argument from hrm_test.data.frame() and hrm_test_internal(); collapse the three if/else dispatches in Repeated.R to their univariate calls - remove the now-dead x$variable branches from print.HRM and summary.HRM (the univariate constructors never set $variable) - delete man/hrm.mv.*.Rd - also relocates the pre-existing research script test_MVHRM.R BREAKING CHANGE: the variable= argument of hrm_test() is removed.
confint() errors on every design with a whole-plot factor, including the
example printed in the README:
z <- hrm_test(value ~ group*region*variable, subject = "subject", data = EEG)
confint(z, level = 0.99)
#> Error: missing value where TRUE/FALSE needed
The correlation matrix passed to mvtnorm::qmvnorm() is singular whenever a
group has fewer subjects than repeated measures (rank <= n_i - 1 < d). For
the example above it is 160x160 with rank 136. Verified still broken under
mvtnorm 1.3.6, so upgrading does not fix it.
The existing tests never caught this: all six confint assertions used 0
whole-plot designs, where the data pools into a single full-rank block.
- move R/conf_int.R and its example to research/, with the findings and a
cov2cor() fix for the O(m^4) correlation loop noted in the header
- preserve the six removed assertions in research/test_confint.R
- add research/bug_confint_wholeplot.R as a reproducer
- unregister the S3 method and delete man/confint.HRM.Rd
BREAKING CHANGE: confint() on an HRM object is no longer available.
R CMD check reported 'Documented arguments not in \usage' for 16 Rd files: roxygen @PARAM tags naming arguments the functions do not have. - remove 15 stale @PARAM tags (group, factor1, factor2, factor) - .E3()/.E4(): rename @PARAM i/M to the real M_i/M_j rather than deleting, which would have left the arguments undocumented - move R/example_*.txt to inst/examples/*.R; files in R/ with non-R extensions were silently dropped from the tarball at build time. Verified all four Rd \examples blocks are byte-identical afterwards. - man/HRM.Rd: rewritten. It carried a hardcoded version table stuck at 1.0.2 / 2018 and a stale maintainer address (martin.happ@aon.at). Drop the table, list all authors with ORCID, use \doi{}, add the R Journal reference and \alias{HRM-package}. - README: drop the GUI, multivariate and confint sections
Dependencies drop from 9 to 6. Depends is now only the R version, so
nothing is attached to the user's search path.
- reshape2 -> data.table for the single melt() call. Passing a data.frame
to data.table::melt() is deprecated and announced to become an error, so
as.data.table() first. Verified the plotted data is unchanged
(all.equal TRUE, 160 rows, identical factor level order).
- move matrixcalc, plyr and ggplot2 from Depends to Imports; qualify the
call sites outside R/ that relied on them being attached
(matrixcalc::vec in test_matrices.R, ggplot2:: in test_plot.R and the
plot example). Validated with _R_CHECK_DEPENDS_ONLY_=true.
- drop doBy and mvtnorm: both were used only by the withdrawn confint()
- drop unused imports: stats::qt, stats::pnorm, data.table::setDT.
Rcpp::evalCpp is kept deliberately -- it is the standard idiom that
ensures Rcpp is loaded, despite appearing unused.
- MASS to Suggests; it is used only by an example, via MASS::mvrnorm()
- Depends: R (>= 4.1.0). The old 3.5.0 floor was unmeetable anyway, since
doBy required 4.2.0; with doBy gone, ggplot2 sets the floor at 4.1.
- DESCRIPTION: fix the author name (person("Harrar W.", "Solomon") had
given/family swapped -- it is Solomon W. Harrar), drop the now-untrue
'univariate or multivariate data' claim, https URLs, add Encoding
Travis-CI and AppVeyor have not run for years and their README badges were broken. The R-hub workflow existed locally but was never committed, so it was not on GitHub at all. - add .github/workflows/R-CMD-check.yaml (r-lib/actions v2): macOS, Windows and Ubuntu on devel/release/oldrel-1, plus an explicit R 4.1 job covering the floor declared in DESCRIPTION, so that claim stays tested. Triggers on 'test' as well as main/master -- the upstream template only watches main/master and would never have run here. - track the R-hub workflow for on-demand cross-platform checks - delete .travis.yml and appveyor.yml
ggplot2 4.0 rebuilt ggplot objects on S7, so class() now returns five
elements instead of two:
"ggplot2::ggplot" "ggplot" "ggplot2::gg" "S7_object" "gg"
All six assertions compared class() for exact equality with
c("gg", "ggplot") and failed on every CI platform with 'Lengths differ:
5 is not 2'. Locally they passed only because ggplot2 3.5.1 was installed.
Use inherits(p, "ggplot") instead, which holds under both. Verified
against ggplot2 4.0.2 in an isolated library: check is clean, tests pass.
Six platform jobs on every push to a development branch is more feedback than it is worth. Collapse to a single Ubuntu job on the oldest supported R, and keep the full matrix for pull requests into main/master, where the cross-platform answer actually matters.
CI on R 4.1 could not resolve dependencies: * deps::.: Can't install dependency pseudorank (>= 0.3.7) * pseudorank: Can't install dependency doBy * doBy: Needs R >= 4.2.0 Dropping doBy as a direct dependency did not remove it: pseudorank imports doBy, so it is still pulled in transitively and still sets the floor at 4.2.0. The earlier 4.1.0 was derived from the R floors of direct dependencies only, which was the wrong thing to measure. - DESCRIPTION: Depends: R (>= 4.2.0) - CI: test the floor at 4.2 instead of 4.1
R 4.2 fails too, one link further down the same chain: doBy imports Deriv, and Deriv 4.3.0 uses R_ClosureFormals, which was added in R 4.5, while declaring no R requirement of its own. So dependency resolution succeeds and the build then fails at compile time. Pin the job to oldrel-1 instead, which tracks a supported R. The declared floor in DESCRIPTION is a separate open question.
confint() aborted for every design with a whole-plot factor, parametric
and nonparametric alike, including the example in the README:
Error: missing value where TRUE/FALSE needed
mvtnorm::qmvnorm() fails once the correlation matrix gets large. It is an
upstream bug, not a rejection of the input: it depends on dimension
together with correlation structure, not rank (a full-rank 60x60 fails, a
singular 40x40 does not), and it is deterministic.
Rather than abort, try progressively weaker multiplicity control and report
which was used in attr(, "status"):
1. FWER over all factor level combinations (qmvnorm on all of R)
2. FWER within each whole-plot group (qmvnorm per block of R)
3. Sidak correction within each group (closed form)
4. none (interval columns are NA)
Designs without a whole-plot factor are unchanged: all six regression
values from 1.2.1 still hold to 1e-4.
Also replaces the O(m^4) correlation loop with stats::cov2cor(), identical
to 3.3e-16 and ~29000x faster, and adds the whole-plot test coverage that
never existed.
* add \value to plot.HRM and HRM-deprecated; CRAN asks for it on every exported object and R CMD check does not catch its absence * plot() on an unsupported design used print() for a diagnostic and returned invisibly; policy wants a condition, so raise an error * drop '?EEG' from the hrm_test example, which opened a help page mid-check * NEWS.md documenting 1.3.0, including the breaking changes * cran-comments.md explaining the 2024 archival and its fixes
Plotting emitted eight deprecation warnings per call under ggplot2 4.0: Use of `means$dimension` is discouraged. i Use `dimension` instead. aes(x = means$dimension, ...) bypasses the data mask: the column is taken from the calling frame rather than from the layer's data. Since data = means is already supplied, reference the columns directly. Uses .data$col rather than a bare col, which would otherwise trigger the 'no visible binding for global variable' NOTE. Verified against ggplot2 4.0.2: no warnings, plot unchanged (160 rows, 4 group colours).
win-builder (R-devel and R-release) reported:
Mismatches for apparent methods not registered:
hrm_test:
function(data, ...)
hrm_test.default:
function(data)
Apparent methods for exported generics not registered:
hrm_test.default
hrm_test.default took no ... and was missing from NAMESPACE, so it was
never dispatched to: calling hrm_test() on an unsupported class produced
R's generic 'no applicable method' error rather than the intended message.
Local R 4.4.2 did not flag this; R-devel and R-release on win-builder did.
Also fixes the R Journal URL, which 301-redirects
(archive/2018/RJ-2018-032 -> articles/RJ-2018-032), and notes in
cran-comments.md that the DESCRIPTION spelling hits are false positives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares HRM 1.3.0 for resubmission to CRAN, where the package was archived
on 2024-04-20 ("issues were not corrected despite reminders").
What caused the archival
The archived 1.2.1 depended on
RGtk2(orphaned and archived from CRAN on2021-12-15) and
tcltk, and declaredSystemRequirements: C++11, which isno longer accepted. All three are gone.
Breaking changes
hrm_GUI()andhrm.GUI()are gone with the RGtk2/tcltkdependency. The code was already commented out, but
hrm.GUI()stillcalled the nonexistent
hrm_GUI().variable=argument ofhrm_test()no longer exists. It shipped with every assertion in its onlytest commented out. Code preserved under
research/.Depends→Imports. Loading HRM no longer attachesggplot2,matrixcalcorplyr. Code passing theme objects toplot()must nowattach ggplot2 itself.
Bug fixes
confint()was broken for every whole-plot design, parametric andnonparametric, including the example in the README. It aborted with
missing value where TRUE/FALSE needed, caused by an upstream failure ofmvtnorm::qmvnorm()on larger correlation matrices — dimension-driven anddeterministic, not a rank problem (a full-rank 60x60 fails, a singular
40x40 does not). It now degrades through four documented modes and reports
which was used in
attr(, "status"): global FWER, per-group FWER,per-group Sidak, or none. Results for designs without a whole-plot factor
are bit-for-bit unchanged.
hrm_test.defaultwas never registered and took no..., sohrm_test()on an unsupported class gave R's generic "no applicablemethod" error instead of the intended message. Only R-devel/R-release
caught this.
$insideaes()produced eight deprecation warnings per plot callunder ggplot2 4.0.
plot()on an unsupported design printed a message and returnedinvisibly; it now raises an error.
Housekeeping
xtable,tcltk,reshape2,RGtk2dropped,MASSto
Suggests.reshape2::meltreplaced bydata.table::melt, whosedata.frame path is deprecated and announced to become an error.
R (>= 4.2.0), which is what the dependency tree can actually install on(
pseudorank→doBy→ R >= 4.2.0).src/*.o,src/HRM.dll) untracked; CRAN forbidsbinaries in source packages.
person("Harrar W.", "Solomon")had given/familyswapped; it is Solomon W. Harrar.
confint()'s correlation matrix used an O(m^4) loop;stats::cov2cor()isidentical to 3.3e-16 and ~29000x faster.
NEWS.mdandcran-comments.mdadded.Test coverage
Added
tests/testthat/test_confint.R: the six regression values from 1.2.1plus whole-plot coverage, which never existed — that gap is why the
confint()failure went unnoticed.Check results
The remaining NOTE is
New submission/Package was archived on CRAN,which cannot be cleared, plus "possibly misspelled"
Happ,et,al— asurname and the citation form the submission checklist requires.
Note on the diff
This branch is 52 commits ahead of
master, of which 35 predate this work(earlier unmerged MVHRM development). The 17 commits from
96a3c00onwardare the CRAN preparation.