NEWS.md
tgs_cor_knn() leaving out the neighbours whose correlation is exactly zero.tgs_cor() and tgs_cor_knn() with pairwise.complete.obs and missing values returning an arbitrary correlation (possibly outside [-1, 1]) for two columns of which one is constant over the rows in which both have values. The correlation is now NA, and in tgs_cor_knn() the two columns are not neighbours.tgs_cor_dist(): the same as tgs_dist(tgs_cor(x)), but much faster and with less memory when x has many more columns than rows.tgs_dist() uses about half the memory on large inputs.tgs_dist() and tgs_cor() without BLAS, and tgs_cor_knn(), skipping one row or column for some input sizes when the number of processes is not a power of 2.tgs_dist() with BLAS returning NaN for identical points when the data has missing values.tgs_cor() with BLAS ranks and standardizes the columns in parallel and no longer holds the correlation matrix twice in memory: Spearman correlations are about 3 times faster and Pearson correlations up to 2 times.tgs_ks() and tgs_wilcox(): a two-sample Kolmogorov-Smirnov test and a Wilcoxon rank sum test (with the AUC) on each column of a matrix, between the rows labeled TRUE and the rows labeled FALSE. The results equal those of ks.test() and wilcox.test() with exact = FALSE.tgs_dist_knn(): the knn nearest rows of each row of x, among the rows of y or of x itself, by euclidean distance, without computing the full distance matrix.tgs_dist() gained a y argument: tgs_dist(x, y) returns the distances between the rows of x and the rows of y. y is now the second argument, so passing diag by position (tgs_dist(x, TRUE)) is an error.tgs_dist() with BLAS returns exactly 0 for identical rows; it used to return a small positive distance.tgs_dist(), tgs_dist_knn() and tgs_cor_dist() accept data frames.tgs_cor() and tgs_cor_knn() accept data frames. tgs_cor() accepts a vector as y (and then also as x), for the correlations of one vector with all the columns of a matrix. y of tgs_cor_knn() defaults to NULL.tgs_cor_knn() uses BLAS when tgs_use.blas is on, which makes it several times faster.tgs_knn() on a matrix is much faster and no longer needs memory for an index of the whole matrix.tgs_matrix_tapply() computes max(), min() and median() in C++, like sum() and mean(), which makes them much faster.margin argument to tgs_matrix_tapply(): margin = 1 groups the rows of the matrix instead of the columns, without transposing it (for sum, the same as rowsum()).tgs_matrix_tapply() with sum() or mean() on a sparse matrix takes time proportional to the number of non-zero values instead of the size of the matrix.tgs_matrix_tapply() returning only NA when arguments are passed to fun through ... (including mean() with trim), and -2147483648 instead of NA when fun returns an integer NA.tgs_matrix_tapply() with sum() or mean() on an integer matrix with NA, which counted NA as -2147483648.NA in the result.tgs_cor() returning -Inf or arbitrary small values instead of NA for constant columns.tgs_cor_knn() dropping valid neighbours when the data has a constant column.tgs_chi2(): vectorized chi-squared test for 2x2 contingency tables, with optional Yates’ correction and support for sparse (dgCMatrix) input.PROTECT issues reported by rchk.Rf_findVar with R_getVar for R 4.6.0 compatibility..claude to .Rbuildignore.options(tgs_tmpdir = "/path") or the TMPDIR environment variable, instead of being hardcoded to /tmp. Fixes permission errors on systems where /tmp is restricted (#17).wait_for_kid()/wait_for_kids() to prevent potential hangs when child processes terminate unexpectedly without being reaped (#18).tgs_cor_knn and temp directory configuration.Rf_ prefix in the c++ code.R_curErrorBuf, SET_TYPEOF in the c++ code.