Skip to content

Fix package load; new randomise() by Jacob van Etten; fewer dependencies - #15

Merged
kauedesousa merged 3 commits into
masterfrom
review/round-1
Oct 31, 2026
Merged

kauedesousa merged 3 commits into
masterfrom
review/round-1

Conversation

@kauedesousa

@kauedesousa kauedesousa commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #14 (merged before these commits landed).

Fix: the package could not be installed. R/getSurvey.R ended with scratch code (an API key, a project, and write.csv() to a local Mac path) that ran at load time. This is the "unable to load R code" failure on #14, and it also affects master now. Removed; getSurvey() is now exported and documented.

New randomise() algorithm (Jacob van Etten)

  • Sequentially balanced incomplete block design: every prefix of the design stays close to balanced, so it holds up when only the first packages are distributed or returned. Blocks are chosen by replication schedule, then exact A-optimality gain (rank-k update of the Laplacian inverse), with availability as a hard limit and sequential position balance. New arguments ridge, polish, schedule; old arguments such as comp are ignored with a warning. Designs differ from earlier versions for the same seed.
  • Base R only, so lpSolve, Matrix, RSpectra and methods are removed from Imports (now httr, jsonlite, stats, utils).
  • Extra tests: balanced prefixes, proportions, ncomp = 2, ignored arguments.
  • The old diagnostic script in tests/ (needs gosset, not a dependency) moved to dev/: since Review round 1: tests in R CMD check, API errors, safer rmGeoIdentity #14 R CMD check runs everything in tests/.
  • The workflow now reports R CMD INSTALL errors as annotations, to diagnose the load failure seen on Review round 1: tests in R CMD check, API errors, safer rmGeoIdentity #14.

https://claude.ai/code/session_01LpE9sTbGPftSMogW6KpkrT


Generated by Claude Code

…Solve, Matrix, RSpectra, methods

- randomize() now builds a sequentially balanced incomplete block design
  (replication schedule, exact A-optimality tie-breaking, hard availability,
  position balance); old arguments are ignored with a warning
- Imports reduced to httr, jsonlite, stats, utils
- tests for prefixes, proportions, ncomp = 2 and ignored arguments
- old diagnostic script moved to dev/ so R CMD check does not run it
- workflow reports R CMD INSTALL errors as annotations on failure

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpE9sTbGPftSMogW6KpkrT
…vey()

The file ended with top-level code that called the API and wrote to a
local path at load time, which broke R CMD INSTALL on all platforms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpE9sTbGPftSMogW6KpkrT
@kauedesousa kauedesousa changed the title New randomise() algorithm by Jacob van Etten; fewer dependencies Fix package load; new randomise() by Jacob van Etten; fewer dependencies Oct 31, 2026
@kauedesousa
kauedesousa marked this pull request as ready for review October 31, 2026 14:00
@kauedesousa
kauedesousa merged commit cb68c87 into master Oct 31, 2026
3 checks passed
@kauedesousa
kauedesousa deleted the review/round-1 branch October 31, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants