Note: This release contains no code changes, feature additions, bug fixes, or API modifications.
method = "systematic" grid sweep for lower dimensional profiles (1 or 2 cuts) to guarantee global maximum discovery with zero performance lag. For higher dimensions ($K \ge 3$), it seamlessly transitions to the evolutionary genetic algorithm (rgenoud backend).summary() methods. The package automatically flags models violating the Cox proportional hazards assumption, distinguishing between Tier 1 (Proportional, Stable) and Tier 2 (Time-Varying, Dynamic Risk) cohorts.nmin cell-floor checking to calculate total available degrees of freedom prior to loop execution. When discrete data density collapses or drops below necessary cell floors, the engine throws clean UX alert messages and skips impossible configurations to prevent fatal R session crashes.The table below outlines how OptSurvCutR automatically routes execution and scales its internal tuning parameters (pop.size and max.generations) based on target complexity ($K$ Cuts) and data structure:
| Target Complexity ($K$ Cuts) | Execution Method | Default Population Size (pop.size) | Default Search Lifespan (max.generations) | Optimisation Mechanics |
| --- | --- | --- | --- | --- |
| $K = 1$ Cut | systematic | N/A (Exhaustive Grid) | N/A (Exhaustive Grid) | Full 1D Coordinate Vector Sweep |
| $K = 2$ Cuts | systematic | N/A (Exhaustive Grid) | N/A (Exhaustive Grid) | Full 2D Cross-Lattice Matrix Sweep |
| $K = 3$ Cuts | genetic | 100 | 50 | 3D Index Hyper-Lattice Traversal |
| $K = 4$ Cuts | genetic | 120 | 55 | 4D Hyper-Lattice Spatial Search |
| $K = 5$ Cuts | genetic | 150 | 60 | 5D Multi-Epitope Surface Clustering |
| $K = 6$ Cuts | genetic | 180 | 65 | 6D High-Dimensional Coordinate Scan |
| $K = 7$ Cuts | genetic | 200 | 70 | 7D Ultra-Deep Hyper-Volume Optimization |
| $K \ge 8$ Cuts | genetic | 250 | 80 | Complex Deep Lattice Cluster Optimisation |
| Low-Density Data (Discrete) | systematic | N/A (Auto-collapsed) | N/A (Auto-collapsed) | Rigid Quantile Step Filtering / Cell Floor Defence |
| Validation / Bootstrap Loop | Context Snapped | 10 (Streamlined default) | 2 (Streamlined default) | Accelerated Resampling Stability Assessment |
find_cutpoint_number): Introduced a new core function to mathematically determine the optimal number of cut-points (0 to 4) before running the genetic search. It supports model selection via Information Criteria (AIC, AICc, and BIC) to balance accuracy against complexity, preventing overfitting to sample-specific noise.validate_cutpoint(). The package now automatically evaluates both the Precision (Maximum CI Width) and Validity (Interval Overlap) of bootstrapped thresholds, categorising them into four distinct tiers: OPTIMAL (Tier 1), DISTINCT (Tier 2), CAUTION (Tier 3), and UNSTABLE (Tier 4).| Stability Tier | Criteria | Clinical Interpretation | | :--- | :--- | :--- | | Tier 1 (OPTIMAL) | Narrow CI Width (< 30%) AND No Overlap | High reliability; thresholds are highly consistent across different samples. | | Tier 2 (DISTINCT) | Zero Interval Overlap (Regardless of CI Width) | The threshold value may vary, but the subpopulations remain fundamentally separate. | | Tier 3 (CAUTION) | Moderate CI Width (30%–60%) WITH Overlap | Moderate instability; thresholds are likely real but sensitive to outliers. | | Tier 4 (UNSTABLE) | High CI Width (> 60%) WITH Overlap | High instability; the model is likely overfitting to sample-specific noise. |
cli Integration): Replaced standard cat() and print() outputs with the cli package. The package now features a highly readable, colour-coded, text-wrapping console UI for summaries, diagnostics, and tiered alerts, safely bypassing base R's 1,000-character warning limits.cpp_get_group_assignments): Migrated the deepest internal bottlenecks from high-level R loops to a native, compiled C++ backend via Rcpp. Instead of relying on R's single-threaded vector copying, a high-speed C++ loop now evaluates continuous variables against candidate thresholds and constructs group partitions directly at the hardware memory layer.findInterval and as.factor Bottlenecks: Replaced the native R group-allocation pipeline within the exhaustive grid search (.get_stat) and the evolutionary objective function (.obj). The engine now bypasses R's high-level object allocation layers entirely, cutting memory overhead significantly during heavy permutation loops and genetic generation iterations.tabulate() Constraint Evaluation: Replaced the expensive R table() and any(nlevels() < num_cuts) validation checks with fast C++ matrix array metrics and vectorised tabulate() calls. Subgroup sizes are now verified instantly using raw memory pointers before any survival formula is compiled, saving thousands of microsecond allocations per evaluation cycle.structure(..., class = "factor") paradigm to map the C++ integer vectors into formula-compliant categorical fields. This prevents R's internal object-replacement methods from stripping away structural attributes when dropped into the data pipeline, ensuring seamless, crash-free interoperability with survival::coxph and survival::survdiff.nmin - 2) into both the systematic and genetic validation layers. This architectural guardrail resolves a structural vulnerability in global optimisation routines when evaluating heavily tied or highly zero-skewed continuous vectors. When a large percentage of observations share identical values (at the lower limit of detection or zero baselines), rigid group-size partitioning constraints become mathematically impossible to fulfil. The introduction of this tolerance window prevents strict gridlock rejections (-Inf / NA), allowing the core optimisation loops to safely navigate around data ties and locate valid optimal solutions.use_cpp = FALSE), falling back to the transparent, native R loop structures without throwing a fatal crash.cut() with findInterval(..., left.open = TRUE) within the fallback mathematical engines. This eliminates expensive string manipulations, making systematic grid searches faster while perfectly preserving the mathematical boundaries of the groups.eval_cache) inside the genetic algorithm wrapper. The algorithm now remembers previously evaluated cut-points and bypasses the survival::coxph model entirely for redundant guesses, drastically cutting computation time on large datasets with many generations.data.frame template, eliminating thousands of redundant memory allocations.validate_cutpoint(). On Unix-based systems (Mac/Linux), the package now dynamically switches to FORK clusters (shared memory) instead of PSOCK. This drops data-transfer overhead to near-zero and drastically speeds up bootstrap validation.plot() method (plot.find_cutpoint()). It now supports full ... argument passthrough to survminer functions for deep customisation, and includes a return_data = TRUE "escape hatch" to extract the raw, stratified plotting data.type = "diagnostic" to automatically evaluate the proportional hazards assumption via survival::cox.zph() and plot the residuals. The summary() function now includes a 2-Tier diagnostic alert to warn users if predictive power shifts significantly over time, gracefully handling singular matrix edge cases.type = "all" to generate a comprehensive, stacked composite plot (powered by patchwork) showing both the predictor distribution and the resulting survival outcome curve in a single clinical snapshot.optsurv_interactive(), a wrapper function that converts any static OptSurvCutR plot into an interactive HTML widget via plotly (ideal for Vignettes and RMarkdown).theme_optsurv() and defaulted to colourblind-safe palettes (e.g., "nejm") to enforce a unified, publication-ready aesthetic across all outputs.p_value criterion would fail (or skip tests) when no covariates were provided. The null model log-likelihood is now extracted dynamically regardless of model length.time column, ensuring the function safely returns NA rather than crashing on pathological datasets.-Inf instead of NA if survival::coxph completely drops a coefficient (e.g., due to extreme collinearity) during a hazard_ratio search..obj() when running unadjusted genetic searches (method = "genetic"). By adding an implicit zero-covariate structural detector, the engine now dynamically bypasses manual parameter init beta matrix arrays when no adjusters are present. This prevents survival::coxph(..., iter.max = 0) from crashing on bare categorical split factors, ensuring unadjusted model selection tables calculate 1 and 2 cuts perfectly.nmin_abs) prior to executing total data headroom matrix checks. This successfully stops proportional constraints (e.g., nmin = 0.25) from silently bypassing sample capacity filters.Sys.getenv("_R_CHECK_LIMIT_CORES_")) into the core architecture. The package now detects when it is running on CRAN's testing servers and automatically throttles itself to 2 cores to prevent rejection, while allowing real users to utilise maximum CPU power.argument "predictor" is missing, with no default) that occurred inside .run_permutations() during high-throughput bootstrap resampling. The signature now maps explicit variable text strings alongside the split memory streams, ensuring independent worker processes (%dopar%) can parse formulas cleanly across separate CPU nodes.argument "data" is missing, with no default) inside the parallel foreach environment. By binding the structural data components directly within the function parameter signature rather than relying on global environmental evaluations, parallel worker environments successfully execute deep iterations across any operating system without variable scope dropouts.summary.find_cutpoint_number_result where the function printed "Unknown" for the main predictor variable under specific covariate-adjusted models. The S3 summary framework now tracks original column metadata across all renaming phases to provide pristine diagnostic dashboards for clinical research reporting.... arguments): Fixed a critical bug where running validate_cutpoint with n_cores > 1 would instantly fail if extra arguments (like max.generations or pop.size) were passed to the foreach loop.suppressWarnings() to prevent these benign warnings from flooding the user's console and breaking the progress bar.find_cutpoint() wrapper. This guarantees that parallel worker nodes on any operating system can successfully locate the internal evaluation functions without namespace crashes.cli::cli_bullets parameter tracking block inside summary.find_cutpoint_number_result. All named bullet outputs are now tightly mapped to explicitly bounded, single-quoted parameters ("*" =), guaranteeing clean console rendering.This patch release addresses CRAN reviewer feedback and polishes the package's console behaviour and visual branding.
print() and cat() statements with message() in the core functions (find_cutpoint(), find_cutpoint_number(), and validate_cutpoint()). Users can now easily silence progress text by wrapping functions in suppressMessages().print() calls from the end of the main S3 calculation functions. Results now return silently when assigned to a variable, while preserving formatted output when called directly.DESCRIPTION file to satisfy CRAN automated parsers.OptSurvCutR hex logo! The logo is now bundled within the package (man/figures/logo.png) and fully integrated into the GitHub README and pkgdown website configuration.Graphical Abstract: Added the new graphical abstract to the image/ folder for inclusion in the README.md.

Presentations: Presented at FOSDEM 2026 in the Bioinformatics & Computational Biology DevRoom in Brussels, Belgium. View lightning talk details
Presentations: Presented at R!SK 2026 (February 18–19, 2026). This 100% online conference focuses on evaluating, measuring, and mitigating risk across diverse industries including healthcare, finance, and insurance. The event featured deep content sessions and live Q&A interactions. View presentation abstract
plot_optimization_curve() $\to$ plot_optimisation_curve() (British English) and plot_schoenfeld() $\to$ plot_cutpoint_residuals() (Namespace conflict).maxiter is now max.generations in genetic algorithm functions to match rgenoud.pop.size and max.generations as explicit arguments in find_cutpoint() and find_cutpoint_number().floor() for nmin calculation to ensure identical sample size handling.validate_cutpoint() now accepts nmin as a proportion and issues an informative message when using the default 90% buffer (Standard G2.10).%||%.@srrstats tags; moved non-applicable standards to R/OptSurvCutR-package.R.use_parallel argument was removed from validate_cutpoint(). Parallel execution is now controlled exclusively by the n_cores argument (n_cores = 1 for sequential, n_cores > 1 for parallel)..validate_event_column() was created in R/utils-helpers.R to centralise the logic for checking that an event column is numeric and contains only 0s and 1s. Both find_cutpoint_number() and the internal helper .validate_data_conditions() (also in R/utils-helpers.R) were updated to call this function, eliminating duplicated code.validate_cutpoint(), the brittle functions_to_export block was removed. The function now correctly relies on the .packages = "OptSurvCutR" argument in the foreach loop, making it easier to maintain.validate_cutpoint() that prevented true reproducibility for parallel runs (n_cores > 1) was fixed. The function now checks for and registers the {doRNG} package when a seed is provided, ensuring results are identical regardless of the number of cores used. The incorrect set.seed(i) call inside the foreach loop was removed.summary.find_cutpoint_number_result() S3 method was updated to robustly handle NULL values in the object$parameters list (e.g., method = NULL). This prevents potential errors if a result object is created manually or improperly and aligns its behaviour with the print() method.find_cutpoint() was updated to clarify that when covariates are provided, the "logrank" criterion is automatically generalised to the more appropriate Cox score test.validate_cutpoint(use_parallel = TRUE) would fail. This was caused by helper functions not being exported to the parallel workers.outcome_event data (e.g., "0:LIVING") caused silent failures. The functions now "fail-fast" with an error, validating the column is numeric with only 0s and 1s.method = "genetic" would report a failure (-Inf) as a successful result. The functions now correctly check for the failure signal and return NA.plot_diagnostics() to generate publication-ready Schoenfeld residual plots, assessing the proportional hazards (PH) assumption.Code Quality (Refactoring): Refactored find_cutpoint() to resolve "high cyclomatic complexity" NOTEs by moving validation logic to internal helper functions.
Test Coverage: Increased test coverage by adding new unit tests for error conditions, edge cases, and validation logic.
rOpenSci/pkgcheck Compliance:
@srrstats tags to satisfy multi-directory requirements.R CMD check Compliance: Addressed all ERRORs, WARNINGs, and NOTEs:
inst/WORDLIST, _PACKAGE documentation, and fixed empty Rd sections.codemeta.json to .Rbuildignore.Code Style:
<- for assignment, " for strings, consistent spacing around operators).sapply() with type-safe vapply() in S3 methods to prevent potential bugs.Internal Data: The crc_virome dataset's status column was corrected to be numeric 0/1 to match documentation and new validation rules.
find_cutpoint() (for method = "systematic" and method = "genetic") and find_cutpoint_number() now support covariate adjustment via the covariates argument. This allows finding optimal cut-points and determining the optimal number of groups while accounting for potential confounders, providing a more robust assessment of a biomarker's independent prognostic value.find_cutpoint() for criterion = "hazard_ratio" and criterion = "p_value" (both systematic and genetic methods). This was achieved by removing computationally expensive summary() calls, extracting coefficients and statistics directly from model objects, and using a fast, manual Likelihood Ratio Test for p-value calculation.use_parallel argument) from find_cutpoint and find_cutpoint_number systematic search. This prevents potential issues with nested parallel calls and relies on standard external parallelisation approaches, such as the explicit parallel loop within validate_cutpoint.testthat suite for improved reliability and robustness. Replaced brittle expect_snapshot() tests with more stable checks like expect_output(), expect_s3_class(), and specific value comparisons. Corrected logic for error and warning expectations and improved mocking for dependency checks. Code coverage increased significantly (for example, to ~86%).rgenoud Check: Added clear, informative error messages using cli in find_cutpoint() and find_cutpoint_number() that trigger immediately if method = "genetic" is requested but the suggested rgenoud package is not installed, guiding the user on how to install it.broom (for plotting) and withr (for testing) from Imports to Suggests in the DESCRIPTION file, making the core package installation lighter. Removed unused magrittr import.find_cutpoint_number() results for brevity (for example, "Substantial support" -> "Substantial").utils::globalVariables definitions into globals.R to resolve R CMD check NOTEs and improve clarity. Removed redundant code.find_cutpoint() and find_cutpoint_number() would fail silently (no console message) when quiet = TRUE was set. Failure messages are now always printed to the console via internal helpers, regardless of the quiet setting, improving user feedback on errors..run_genetic_search() function to gracefully manage edge cases like insufficient data variability or non-finite predictor ranges, preventing downstream errors and cryptic warnings.rgenoud::genoud) to correctly respect the print.level argument (controlled indirectly via user functions), ensuring progress updates are displayed or suppressed as intended.NAMESPACE errors and related test failures by adding explicit stats:: calls where needed (for example, for stats::quantile, stats::sd, stats::pchisq) and ensuring correct regeneration of the NAMESPACE file via devtools::document().NOTE regarding "no visible binding for global".find_cutpoint() and validate_cutpoint() with TCGA virome data (for example, Alphapapillomavirus as a predictor), guiding users through cut-point optimisation and stability assessment for survival analysis.testthat, covering core functions (find_cutpoint(), find_cutpoint_number(), validate_cutpoint()) and edge cases like missing data or small sample sizes, with code coverage reporting via covr to ensure reliability (>80% coverage).find_cutpoint() by implementing adaptive pop.size (for example, 50 for num_cuts = 1) and max.generations (for example, 75), reducing runtime by 20–50% for survival datasets while maintaining accuracy for optimal cut-point selection.validate_cutpoint() to provide specific feedback on bootstrap validation failures, such as insufficient sample sizes or non-converging coxph models, improving user debugging experience.pkgdown GitHub Action to automatically build a package website, improving documentation accessibility, and updated README with badges for build status and code coverage to signal package reliability.DESCRIPTION with corrected URLs, dependency versions, and regenerated Rd files for consistent documentation across all functions.find_cutpoint() to robustly process survival datasets with missing predictor values, preventing errors in coxph or survdiff model fitting for real-world data like TCGA virome datasets.find_cutpoint(), find_cutpoint_number()) with improved numerical stability and accuracy for survival model fitting, particularly for genetic algorithm convergence in high-dimensional predictors.validate_cutpoint() during bootstrap validation runs.OptSurvCutR for optimising cut-points in survival analysis.find_cutpoint() to identify optimal cut-points for continuous predictors using systematic or genetic algorithms (via rgenoud) with log-rank, p-value, or hazard-ratio criteria.find_cutpoint_number() to select the optimal number of cut-points using AIC, AICc, or BIC.validate_cutpoint() for bootstrap-based stability assessment of cut-points.survival::coxph and survival::survdiff.