matrixCorr-internal: matrixCorr: Collection of Correlation and Association...

matrixCorr-internalR Documentation

matrixCorr: Collection of Correlation and Association Estimators

Description

Compute correlation and other association matrices from small to very large datasets with simple, 'cor()'-like functions and sensible defaults. Includes options for shrinkage and robustness to improve results in noisy or high-dimensional settings (p >= n), plus convenient print/plot methods for inspection. Implemented with optimised 'C++' backends using 'BLAS'/'OpenMP' and memory-aware symmetric updates. Works with base matrices and data frames, returning standard 'R' objects via a consistent S3 interface. Useful across genomics, agriculture, and machine-learning workflows. Methods based on Ledoit and Wolf (2004) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/S0047-259X(03)00096-4")}; Schäfer and Strimmer (2005) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2202/1544-6115.1175")}; Lin (1989) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2532051")}.

Validates and normalizes input for correlation computations. Accepts either a numeric matrix or a data frame, filters numeric columns, checks dimensions and missing values, and returns a numeric (double) matrix with preserved column names.

Usage

validate_corr_input(data)

Arguments

data

A matrix or data frame. Non-numeric columns are dropped (data.frame path). For matrix input, storage mode must be integer or double.

Details

Rules enforced:

  • Input must be a matrix or data.frame.

  • Only numeric (integer or double) columns are retained (data.frame path).

  • At least two numeric columns are required.

  • All columns must have the same length and \ge 2 observations.

  • Missing values are not allowed.

  • Returns a double matrix; integer input is converted once.

Value

A numeric matrix (type double) with column names preserved.

Author(s)

Maintainer: Thiago de Paula Oliveira toliveira@abacusbio.com (ORCID)

Thiago de Paula Oliveira

See Also

Useful links:

pearson_corr(), spearman_rho(), kendall_tau()


matrixCorr documentation built on Aug. 26, 2025, 5:07 p.m.