thisutils (development version)
-
feat:
- Add
check_r(strict = TRUE)to stop with an install hint if a package remains unavailable. - Add
sum_columns_by_group()to sum columns by group in order of first appearance, preserving sparsity for sparse inputs.
- Add
-
compatibility:
- Preserve the position of the
verboseargument incheck_r().
- Preserve the position of the
thisutils 0.5.3
CRAN release: 2026-10-28
-
feat:
- Add
fit_trends()for GAM and PreTSA trends, with fit scores, peak and valley times, and raw and adjusted P-values. Optional fitted values and bounds follow input order. GAM bounds use +/- 2 standard errors on the link scale. PreTSA bounds equal the fitted values. - Add
local_verbose()to setlog_message.verbosefor the calling scope and restore it on exit. - Add
--demoto the Python and Shelllog_messagescripts, replacing the standalone examples.
- Add
-
compatibility:
- Replace
inst/python/withinst/scripts/for Python and Shell helpers. The scripts ignoreLOG_MESSAGE_VERBOSE, default to visible output, and honourNO_COLOR. -
askprompts anderrorsignals remain active withverbose = FALSEin R, Python, and Shell. R uses explicitverbose, thenoptions(log_message.verbose), then visible output. -
invoke_fun()builds calls faster and requires a list, pairlist, orNULLfor argument values. Calls with arguments use a child environment that contains side effects and temporary symbols. Captured calls leave large objects in that environment and may be unreplayable. String function names and explicit missing arguments retain their behaviour.
- Replace
-
fix:
- Keep nonconstant zero-sum features in PreTSA trend significance tests and return a P-value of one for constant features.
- Include zero values in
fast_aggregate()means and align them withaggregate_matrix()means. - Apply grouped maximum, minimum, and custom summaries separately to each column, preserving dimensions and names for single-row groups.
- Preserve missing values when sparse maxima use
na.rm = FALSE, and respect symmetric and triangular sparse matrix storage. - Recognize pak’s
github::prefix in installed repository metadata when checking package sources, avoiding unnecessary reinstallation. - Keep the original
check_r()installation error when the optionalremotespackage is not installed. - Report PSOCK worker exits during send or result collection as
parallelize_worker_erroracross locales. Propagate the original serialization error when the worker is alive.
-
docs:
- List
local_verbosein the pkgdown reference index.
- List
thisutils 0.5.2
-
feat:
- Add
%|||%forNULLor zero-length fallbacks.%ss%remainsNULL-only so it does not mask rlang%||%. - Add
detect_cores(), which reports the number of CPU cores and clamps it to an optionalmax_threadsbound, falling back to1when the probe fails. Supplyingnum_sessiongives the worker-count heuristic thatparallelize_fun()uses, so core detection lives in one place. - Add
col_maxs(),row_maxs(),fast_aggregate(), andaggregate_matrix()for dense and sparse matrices. Sparse maxima treat implicit zeros as zero.
- Add
-
performance:
- Reduce per-task overhead by sharing message capture and nested-worker setup within each scheduled batch.
- Send smaller PSOCK exports and only the assigned inputs and random-number streams per batch. Use native serialization for same-host workers.
- Skip lifecycle logging with
verbose = FALSE. Verbose output formats the first 20 distinct error types and results retain every error object.
-
fix:
- Collapse vector results in
parse_inline_expressions()to a single string so inline formatting can report the original error.
- Collapse vector results in
thisutils 0.5.0
CRAN release: 2026-08-21
-
compatibility:
- Preserve the historical
matrix_to_table(keep_zero = TRUE)default. Compact table output remains an explicit choice. -
run_sparse_topk_by_column()still ranks stored entries and fills missing ranks withNAindices and zero values.run_sparse_topk_stored()fills both indices and values withNA.run_sparse_topk()includes implicit zeros by default.
- Preserve the historical
-
feat:
- Add
run_dense_topk()with an explicitby = "col"orby = "row"direction and a decreasing top-k default. - Add
run_sparse_topk()andrun_sparse_topk_stored()with an explicitby = "col"orby = "row"direction. The earlier column-wise names remain available as compatibility wrappers. - Allow
parallelize_fun(verbose = TRUE, progress = FALSE)to retain standardizedlog_message()lifecycle output without a dynamic terminal progress bar. - Make Pearson
sparse_cor()blockwise and add correlation threshold, dense working-memory, and opt-in sparse output-size controls. The output limit defaults toInffor compatibility. Spearman and Kendall paths now check their dense allocation boundary before conversion. - Expose exact LISI neighbor-search strategy, C++ thread count, and dense input-memory controls through
compute_lisi().
- Add
-
fix:
- Detect cancellation-prone row variance calculations and recompute only the affected dense or sparse rows with a stable two-pass calculation, preserving the existing fast path for ordinary inputs.
- Replace infinite correlations with zero when
remove_inf = TRUE. - Summarize failed structured or matrix-valued tasks by their task name or shape, preventing verbose error reporting from masking the original worker error.
-
docs:
- Document sparse semantics and memory and CPU limits. Add workflow vignettes, reporting examples, and a benchmark plan.
-
tests:
- Verify fork worker cleanup after external interruption and cover the default PSOCK backend with an in-process interrupt test.
thisutils 0.4.9
CRAN release: 2026-08-04
-
fix:
-
log_message()now emits an actual R warning formessage_type = "warning", so warnings are visible totryCatch(),warn = 2, andwarning()handlers.
-
thisutils 0.4.8
-
feat:
- Add
classification_metrics_compute()plus dense and sparse column-wise top-k helpers, with native C++ implementations.
- Add
- fix:
thisutils 0.4.5
CRAN release: 2026-04-24
-
feat:
- Add
collapse_sparse_rows(): collapse sparse matrix rows by group while preserving sparse output and row order. - Update
compute_lisi(): simplify nearest-neighbor backend selection by removing thehnswpath and using a more conservative"auto"strategy that prefers the package’s exact backend only for very small problems. - Improve
parallelize_fun(): refactor verbose multi-core execution to collect results dynamically while preserving input order and progress reporting across uneven workloads. - Improve
log_message(): allow explicitverboseto override the global option and normalize capturedclialerts emitted insideexpr.
- Add
-
fix:
- Harden
normalization()against degenerate inputs so zero-variance or zero-sum vectors return stable values instead ofNaN/Inf. - Fix
matrix_to_table()sparsekeep_zero = TRUEhandling to match dense output more reliably and make equal-magnitude sorting deterministic. - Fix
table_to_matrix()to aggregate duplicate row/column coordinates consistently in both dense and sparse output paths. - Update package startup behavior to stay silent in non-interactive sessions and when verbose logging is disabled.
- Update package installation helpers to use
pak::pkg_install()/pak::pkg_remove()with explicit library handling.
- Harden
-
docs:
- Add a runnable example for
collapse_sparse_rows(). - Refresh
compute_lisi()andlog_message()documentation to match the current arguments and defaults.
- Add a runnable example for
-
tests:
- Cover sparse aggregation, LISI backends, matrix conversion, degenerate normalization, parallel execution, and logging in regression tests.
thisutils 0.4.4
CRAN release: 2026-04-02
-
feat:
- Add
compute_lisi(): compute per-cell Local Inverse Simpson’s Index (LISI) scores for categorical variables. - Enhance
log_message(): add optionalexprsupport to capture standard output, messages, and warnings from another expression and re-print them withlog_message()formatting while returning the evaluated result. -
parallelize_fun():- Suppress C/C++ level stderr output (e.g.,
"Error : Not a matrix.") and warnings during function execution inparallelize_fun()via stderr redirection andsuppressWarnings(). - Group error reporting by message: identical errors are now collapsed into a single line with count and up to 3 example task names, instead of printing every failure individually.
- Add
progress_bar_widthtoparallelize_fun()for direct progress bar width control; default width is now10.
- Suppress C/C++ level stderr output (e.g.,
- Add
-
fix:
-
parallelize_fun()- Fix result length mismatch when
cores = 1: useoutput_list[i] <- list(result)instead ofoutput_list[[i]] <- resultto preventNULLreturns from shrinking the output list. - Fix multi-core result ordering in verbose mode: results are now written back by original index so output order and assigned names stay aligned with input.
- Fix core detection fallback: when
parallel::detectCores(logical = FALSE)is unavailable or returns an invalid value, execution now falls back safely to at least one worker instead of failing.
- Fix result length mismatch when
-
thisutils 0.4.2
CRAN release: 2026-02-23
-
feat:
- Add
check_ci_env(): detect whether the current session should be treated as CI/pkgdown context; returnsTRUEfor interactive sessions and for GitHub Actions whenGITHUB_ACTIONS=trueandGITHUB_WORKFLOW=pkgdown(case-insensitive), otherwise returnsFALSE. - Add
is_outlier(): detect outlier indices using median and MAD-based bounds (nmads,constant) withtype = "both"|"lower"|"higher;NAvalues are also included in the returned index vector. - Export
check_pkg_status(): make the package/version checker available as a public API; it checks installation status in a target library (lib) and optionally verifies exact version match whenversionis provided.
- Add
thisutils 0.4.1
-
feat:
- Remove
@examplesforcheck_r()function.
- Remove
thisutils 0.4.0
-
feat:
- Add
check_r(): check and install R packages from CRAN, Bioconductor, or GitHub; supports version pinning (pkg@versionorpkg==version) and optionalforcereinstall; usespak::pak()for installation with configurablelibanddependencies. - Add
remove_r(): check and remove installed R packages from the given library; usespak::pkg_remove(); skips packages that are not installed and reports success or failure per package.
- Add
thisutils 0.3.9
-
feat:
- Fix
add_pkg_file()dependency management:clidependency is now added with correct comma separation, and both Imports and Suggests sections are automatically sorted alphabetically. The Suggests section is now enforced to follow Imports.
- Fix
thisutils 0.3.8
-
feat:
- Improve
add_pkg_file()flow: better metadata extraction/logging from DESCRIPTION, and smarter logo generation fallback when figlet fails. Generated package files now include@useDynLibonly whensrc/exists. - Refresh startup messages:
.onAttach()now shows package version, release date, and website link in both generated package files.
- Improve
thisutils 0.3.7
-
feat:
- Improve dimension-name handling in
matrix_to_table()andtable_to_matrix(). - Speed up
matrix_to_table(keep_zero = TRUE)and omit explicit zeros from sparsetable_to_matrix()output.
- Improve dimension-name handling in
thisutils 0.3.6
CRAN release: 2026-01-08
-
feat:
- Fix warning about ‘ATTRIB’ from check results of CRAN.
thisutils 0.3.5
-
feat:
- Simplify
parallelize_fun()function: Unified progress bar creation logic by removing conditional branches and using a single consistent format. Updated progress bar format string for better readability and consistency. - Add
get_namespace_fun()function.
- Simplify
thisutils 0.3.4
-
feat:
- Enhance
log_message()function: Added new"ask"message type for interactive user prompts. Whenmessage_type = "ask", the function usesutils::askYesNo()to prompt the user and returnsTRUEfor Yes,FALSEfor No, andNAfor Cancel. - Optimize
parallelize_fun()function: Improved progress bar status display in parallel processing mode. Now shows only the first item name/value with ellipsis (“…”) instead of concatenating all chunk items, resulting in cleaner and more concise progress display.
- Enhance
thisutils 0.3.3
-
feat:
- Refactor internal helper functions in
log_message()andadd_pkg_file(): Converted private helper functions (prefixed with.) to public functions, improving code accessibility and maintainability. Functions affected includebuild_message(),validate_params(),output_message(),style_formatting(),plain_text_output(),get_caller_call(),extract_function_name(),make_color_style(),check_color(), andgenerate_content().
- Refactor internal helper functions in
-
docs:
- Add
@returndocumentation forthisutils_logo()and logo functions generated byadd_pkg_file().
- Add
thisutils 0.3.2
-
feat:
- Change default value of
timestamp_styleparameter inlog_message()function fromTRUEtoFALSEfor cleaner default output.
- Change default value of
thisutils 0.3.1
CRAN release: 2025-11-17
-
docs:
- Update
figlet()references to use HTTPS, addressing CRAN incoming NOTE.
- Update
thisutils 0.3.0
-
feat:
- Enhance
log_message()function: Added newplain_textparameter to suppress level, symbol, timestamp, and message type formatting while preserving color and multiline settings, allowing for cleaner text-only output. - Improve
add_pkg_file()function: Enhanced message types and formatting, using more appropriate message types (warning,running) and improved file references in log messages.
- Enhance
thisutils 0.2.5
-
feat:
- Optimize
check_sparsity()function: Improved calculation logic by computing total counts upfront, avoiding redundant calculations for sparse and non-sparse matrices. - Optimize
normalization()function: Enhancedmax_minandmaximummethods by caching min/max values to avoid repeated calculations. - Improve code quality in
parallelize_fun(): Replacedsapply()withvapply()for type-safe return values and optimized error handling logic. - Optimize P-value combination functions (
meanp(),sump(),votep()): Extractedvalidpvariable to avoid repeated indexing and improved code efficiency. - Enhance
sump()function: Replaced loop-based calculation with vectorized operations for better performance. - Improve
capitalize()andunnest_fun()functions: Replacedsapply()withvapply()for type safety. - Enhance
add_pkg_file()function: Now automatically checks for the existence ofsrcdirectory and only adds@useDynLibdirective whensrcfolder is present in the package environment.
- Optimize
thisutils 0.2.4
-
feat:
- Enhance
log_message()function: Now automatically handles non-character objects (e.g.,data.table,data.frame) by formatting them withcapture.output(print(...)), allowing direct object input without manual string conversion.
- Enhance
thisutils 0.2.3
-
feat:
- Rewrite
matrix_to_table()C++ implementation to iteratedgCMatrixslots directly, avoiding dense conversion and reducing memory/time cost on large sparse matrices. - Align
keep_zero/thresholdsemantics across C++/R: retain entries ifabs(value) >= threshold; zeros are retained only whenkeep_zero = TRUEandthreshold == 0.
- Rewrite
thisutils 0.2.2
-
feat:
- Enhance
parallelize_fun()function: Added support for named vectors and vectors in progress display, showing current processing item names or values in the progress bar. Improved progress bar formatting with status information and enhanced parallel processing progress updates. - Improve visual formatting in
add_pkg_file()andthisutils-package.R: Enhanced separator line display with grey color styling usingcli::col_grey()for better visual consistency.
- Enhance
thisutils 0.2.1
-
feat:
- Enhance
add_pkg_file()function: Added automatic dependency checking to ensureclipackage is included in DESCRIPTION file, and automatic pkgdown configuration checking to ensure proper package overview section setup.
- Enhance
thisutils 0.2.0
CRAN release: 2025-10-06
-
feat:
- Add package logo.
- Add
get_verbose()function: New exported function to get verbose option from global options or local arguments, providing better control over message display. - Enhance
.onAttach()function: Now respects verbose settings and only displays startup messages when verbose mode is enabled, improving user experience. - Update
add_pkg_file()function: Generated.onAttach()function now includes verbose check usingget_verbose(), ensuring consistency with package behavior.
-
docs:
- Corrected brace escaping in
parse_inline_expressions().
- Corrected brace escaping in
thisutils 0.1.7
-
feat:
- Refactor
add_pkg_file()function: Simplified function parameters by removing manual parameter inputs and automatically extracting all package information from DESCRIPTION file. Enhanced error handling and improved logging messages. - Enhance
parallelize_fun()function with robust error handling: Addedclean_resultparameter to control automatic removal of failed results, andthrow_errorparameter to control detailed error message display. Functions now gracefully handle partial failures without stopping execution. - Add
parse_inline_expressions()function: High-performance inline expression parser that evaluates{}expressions while preserving CLI formatting markers like{.val ...}. - Enhance
log_message()function: Add new"running"message type with orange circle dotted symbol (◌) to indicate ongoing processes.
- Refactor
thisutils 0.1.6
-
feat:
- Add statistical P-value combination functions:
wilkinsonp(),maximump(),minimump(),meanp(),votep(), andsump()for meta-analysis and multiple study result integration. - Add
max_depth()function to calculate the maximum depth of nested lists.
- Add statistical P-value combination functions:
thisutils 0.1.5
CRAN release: 2025-09-11
-
feat:
- Update
add_pkg_file()function. Now,add_pkg_file()can automatically extract information of R package fromDESCRIPTIONfile and save it in the./R/folder.
- Update
thisutils 0.1.3
-
feat:
- Replace
purrr::map2()withmapply(), and deletepurrrpackage inDESCRIPTION. - Replace
methods::is()withinherits(), and deletemethodspackage inDESCRIPTION.
- Replace
-
docs:
- Update documentation for some functions.
thisutils 0.1.1
-
feat:
- Add
matrix_process()function.
- Add
thisutils 0.0.9
-
feat:
- Add
matrix_to_table()andtable_to_matrix()functions for data conversion between matrix and table formats. - Modify parameter
sparsetoreturn_sparseforas_matrix()
- Add
-
docs:
- Update documentation for some functions.