feat: add DS-np control chart wrapper#21
Merged
Merged
Conversation
Add cchart.DSnp() as the high-level function for building double-sampling np control charts. The function classifies observations through a two-stage decision process using fractional limits (wl, ucl1, ucl2) and returns a structured object with data, limits, parameters, and performance metrics. Includes: - R/cchart.DSnp.R: main function and S3 plot method - tests/testthat/test-cchart-DSnp.R: 74 tests covering structure, classification logic, validation, limit computation, and plot - Updated README with DS-np in implemented methods table - Updated vignette with dsnp_limits() and cchart.DSnp() examples - Restored VignetteBuilder/knitr/rmarkdown in DESCRIPTION - Fixed missing stats::integrate import in d2.R Closes #5
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.
Summary
cchart.DSnp()as the high-level function for building double-sampling np control charts, completing the DS-np API proposed in issue [P1] Implementar gráfico DS-np corrigido para processos de alta qualidade #5x1vs integer thresholds derived from fractional limits, second-stage evaluation using combinedx1 + x2countsplot.cchart.DSnp()method for operational visualization of the chartChanges
New files:
R/cchart.DSnp.R— main function, S3 plot method, and full roxygen2 documentationtests/testthat/test-cchart-DSnp.R— 74 tests covering structure, classification, validation, limit computation, performance consistency, and plottingman/cchart.DSnp.Rd,man/plot.cchart.DSnp.Rd— generated documentationModified files:
DESCRIPTION— restoredknitr/rmarkdownSuggests andVignetteBuilder: knitr(lost in dsnp-limits branch)NAMESPACE— addedcchart.DSnpexport,plot.cchart.DSnpS3 method,graphics::legendimportR/d2.R— added missingstats::integrateimportREADME.md— added DS-np to implemented methods table; marked DS-np as Implemented in roadmapvignettes/iqcc-positioning.Rmd— addeddsnp_limits()+cchart.DSnp()example; updated roadmapman/*.Rd— regenerated by roxygen2 7.3.1Limit resolution logic
limitsobject provided → uselimits$bestthresholdswl,ucl1,ucl2provided → use directlydsnp_limits()automaticallyTest results
All 316 tests pass (74 new + 242 existing). R CMD check passes with only pre-existing warnings (version number, missing qpdf).
Closes #5