Skip to content

Fix: export fpc_wsvd generic (urgent, CI red — 2 ERRORs in R CMD check)#288

Merged
fabian-s merged 1 commit into
claude/jolly-planck-nvXkZfrom
claude/fix-fpc-wsvd-export
Jun 11, 2026
Merged

Fix: export fpc_wsvd generic (urgent, CI red — 2 ERRORs in R CMD check)#288
fabian-s merged 1 commit into
claude/jolly-planck-nvXkZfrom
claude/fix-fpc-wsvd-export

Conversation

@fabian-s

Copy link
Copy Markdown
Contributor

Urgent — fixes R CMD check ERRORs across the OS matrix.

PR #280 (hygiene A docs) added an @examples block to man/fpc_wsvd.Rd per the original docs hygiene scope (one of the topics flagged as "missing @examples"). The example calls fpc_wsvd(data, ...) at the user level, but the generic itself was never exported — only its .matrix and .data.frame methods carried @export tags (registered via S3method() in NAMESPACE).

R CMD check --as-cran runs examples in a fresh session that only sees exported symbols, so:

> fpc <- fpc_wsvd(data, arg = arg, pve = 0.99)
Error in fpc_wsvd(data, arg = arg, pve = 0.99) :
  could not find function "fpc_wsvd"
Execution halted

aborts the check with 2 ERRORs on every OS matrix entry (macos/ubuntu/windows × release/devel/oldrel-1).

Fix

One-line @export on the fpc_wsvd generic in R/tfb-fpc-utils.R. NAMESPACE updated by hand-adding export(fpc_wsvd) (avoiding a full document() run that would churn ~40 unrelated Rd files via roxygen version drift — established pattern across this PR stack).

Verified locally: devtools::load_all(); fpc_wsvd resolves and reports namespace:tf binding.

https://claude.ai/code/session_01M1QMfji5MpKJvzJYw5Kjb9


Generated by Claude Code

PR #280 added an @examples block to man/fpc_wsvd.Rd that calls
fpc_wsvd(data, ...) at the user level, but the generic itself was
never exported -- only its .matrix and .data.frame methods carried
@export tags (registered via S3method() in NAMESPACE). R CMD check
--as-cran runs the examples in a fresh session that only sees
exported symbols, so 'could not find function fpc_wsvd' aborts the
check with 2 ERRORs.

One-line @export on the generic + matching export(fpc_wsvd) in
NAMESPACE (hand-added; no document() to avoid the roxygen drift
churn on ~40 Rd files).

https://claude.ai/code/session_01M1QMfji5MpKJvzJYw5Kjb9
Copilot AI review requested due to automatic review settings June 11, 2026 14:42
@fabian-s fabian-s merged commit 0f7d704 into claude/jolly-planck-nvXkZ Jun 11, 2026
1 check failed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Exports the fpc_wsvd generic so package users can call it directly and so S3 dispatch works from outside the package.

Changes:

  • Add roxygen @export tag to fpc_wsvd documentation block.
  • Add export(fpc_wsvd) to NAMESPACE.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
R/tfb-fpc-utils.R Marks fpc_wsvd as exported via roxygen.
NAMESPACE Exposes fpc_wsvd at the package level.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread NAMESPACE
export(as.tfd_mv)
export(ensure_list)
export(fivenum)
export(fpc_wsvd)
Comment thread R/tfb-fpc-utils.R
Comment on lines +45 to 48
#' @export
fpc_wsvd <- function(data, arg, pve = 0.995) {
UseMethod("fpc_wsvd")
}
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