HenrikBengtsson / matrixStats

R package: Methods that Apply to Rows and Columns of Matrices (and to Vectors)
https://cran.r-project.org/package=matrixStats
206 stars 34 forks source link

typos #259

Closed spaette closed 5 months ago

spaette commented 6 months ago

Should typos in HISTORY be fixed?

Extended template

$ sed -n '249,251p' matrixStats/src/rowRanksWithTies_lowlevel_template.h
 2013-01-13 [HB]
 o Template cleanup.  Extened tempate to integer matrices.
 o Added argument 'tiesMethod' to rowRanks().
$ 

I presume a typo in reproduced terminal output should not be fixed.

recommended

$ grep -nr recomended matrixStats
matrixStats/revdep/R_MATRIXSTATS_USENAMES_NA=defunct/problems.md:9233:      4.3.2; it is recomended that you reinstall 'SeuratObject' as the ABI
$ 

Should the typo in NEWS.md be fixed and that string removed from inst/WORDLIST?

deprecated

$ grep -nr deprecatated matrixStats
matrixStats/NEWS.md:1113: * Calling `indexByRow(X)` with a matrix `X` is deprecatated.  Instead
matrixStats/inst/WORDLIST:148:deprecatated
$ 

The below might be all be found within comments.

Standardized accommodate boundaries boundary coercing contiguous idiomatic indices infinite noticeably optimization positive temporary

$ grep -nr Standarized matrixStats
matrixStats/R/rowWeightedMeans.R:108:      # Standarized weights summing to one w/out missing values
matrixStats/R/rowWeightedMeans.R:247:      # Standarized weights summing to one w/out missing values
$ grep -nr accomodate matrixStats
matrixStats/src/rowRanksWithTies.c:16: * The returned rank is a REAL matrix to accomodate average ranks
$ grep -nr bounderies matrixStats
matrixStats/tests/binMeans,binCounts.R:146:# Zero bin bounderies (invalid bin definition)
matrixStats/tests/binCounts.R:83:# Zero bin bounderies (invalid bin definition)
$ grep -nr boundery matrixStats
matrixStats/tests/binMeans,binCounts.R:151:# One bin boundery (invalid bin definition)
matrixStats/tests/binCounts.R:88:# One bin boundery (invalid bin definition)
$ grep -nr coersing matrixStats
matrixStats/tests/sum2.R:272:# Input is double but coersing result to integer
$ grep -nr contigous matrixStats
matrixStats/src/logSumExp_lowlevel_template.h:33:  the "contigous" 'xx' vector once.  This is more likely to create
matrixStats/src/logSumExp_lowlevel_template.h:95:       temporary contigous vector while scanning for the
$ grep -nr ideomatic matrixStats
matrixStats/src/rowRanksWithTies_lowlevel_template.h:124:       * is indeed useless, but for keeping the code ideomatic, we still do it
$ grep -nr indicies matrixStats
matrixStats/src/rowCumprods_lowlevel_template.h:74:                 * the possibility of having NA indicies
matrixStats/src/rowCumprods_lowlevel_template.h:112:                   * the possibility of having NA indicies
matrixStats/src/rowCumprods_lowlevel_template.h:178:                   * the possibility of having NA indicies
matrixStats/src/rowVars_lowlevel_template.h:88:             * the possibility of having NA indicies
matrixStats/src/colCounts_lowlevel_template.h:57:                     * the possibility of having NA indicies
matrixStats/src/colCounts_lowlevel_template.h:97:                     * the possibility of having NA indicies
matrixStats/src/colCounts_lowlevel_template.h:151:                     * the possibility of having NA indicies
matrixStats/src/colCounts_lowlevel_template.h:191:                     * the possibility of having NA indicies
matrixStats/src/colCounts_lowlevel_template.h:243:                     * the possibility of having NA indicies
matrixStats/src/colCounts_lowlevel_template.h:281:                     * the possibility of having NA indicies
matrixStats/src/rowSums2_lowlevel_template.h:73:                 * the possibility of having NA indicies
matrixStats/src/rowCumsums_lowlevel_template.h:70:                 * the possibility of having NA indicies
matrixStats/src/rowCumsums_lowlevel_template.h:107:                   * the possibility of having NA indicies
matrixStats/src/rowCumsums_lowlevel_template.h:173:                   * the possibility of having NA indicies
matrixStats/src/rowMeans2_lowlevel_template.h:74:             * the possibility of having NA indicies
matrixStats/src/rowMeans2_lowlevel_template.h:127:               * the possibility of having NA indicies
matrixStats/src/rowMads_lowlevel_template.h:105:               * the possibility of having NA indicies
matrixStats/src/rowMedians_lowlevel_template.h:100:                 * the possibility of having NA indicies
matrixStats/src/rowCumMinMaxs_lowlevel_template.h:68:                 * the possibility of having NA indicies
matrixStats/src/rowCumMinMaxs_lowlevel_template.h:110:                   * the possibility of having NA indicies
matrixStats/src/rowCumMinMaxs_lowlevel_template.h:190:                   * the possibility of having NA indicies
matrixStats/src/colRanges_lowlevel_template.h:73:                     * the possibility of having NA indicies
matrixStats/src/colRanges_lowlevel_template.h:137:                     * the possibility of having NA indicies
matrixStats/src/colRanges_lowlevel_template.h:202:                     * the possibility of having NA indicies
matrixStats/src/x_OP_y_lowlevel_template.h:127:                       * the possibility of having NA indicies
matrixStats/src/x_OP_y_lowlevel_template.h:187:                       * the possibility of having NA indicies
matrixStats/src/x_OP_y_lowlevel_template.h:249:                       * the possibility of having NA indicies
matrixStats/src/x_OP_y_lowlevel_template.h:309:                       * the possibility of having NA indicies
matrixStats/src/x_OP_y_lowlevel_template.h:373:                       * the possibility of having NA indicies
matrixStats/src/x_OP_y_lowlevel_template.h:430:                       * the possibility of having NA indicies
matrixStats/src/x_OP_y_lowlevel_template.h:488:                       * the possibility of having NA indicies
matrixStats/src/x_OP_y_lowlevel_template.h:545:                       * the possibility of having NA indicies
matrixStats/src/rowDiffs_lowlevel_template.h:119:                   * the possibility of having NA indicies
matrixStats/src/rowDiffs_lowlevel_template.h:137:                   * the possibility of having NA indicies
matrixStats/src/rowDiffs_lowlevel_template.h:171:                   * the possibility of having NA indicies
matrixStats/src/rowDiffs_lowlevel_template.h:189:                 * the possibility of having NA indicies
matrixStats/src/rowCounts_lowlevel_template.h:60:                       * the possibility of having NA indicies
matrixStats/src/rowCounts_lowlevel_template.h:100:                       * the possibility of having NA indicies
matrixStats/src/rowCounts_lowlevel_template.h:155:                       * the possibility of having NA indicies
matrixStats/src/rowCounts_lowlevel_template.h:195:                       * the possibility of having NA indicies
matrixStats/src/rowCounts_lowlevel_template.h:247:                     * the possibility of having NA indicies
matrixStats/src/rowCounts_lowlevel_template.h:285:                   * the possibility of having NA indicies
$ grep -nr infite matrixStats
matrixStats/src/weightedMedian_lowlevel_template.h:37:  /* Check for missing, negative, and infite weights */
$ grep -nr noticibly matrixStats
matrixStats/src/logSumExp_lowlevel_template.h:248:   detected in step 1 ("max value"), which should be noticibly faster
$ grep -nr optimiztion matrixStats
matrixStats/src/000.templates-types.h:149: This may seem like a futile optimiztion (we do branching),
$ grep -nr positve matrixStats
matrixStats/src/validateIndices.c:94:  * `allowOutOfBound` indicates whether to allow positve out of bound indexing.
matrixStats/src/validateIndices.c:133:  * `allowOutOfBound` indicates whether to allow positve out of bound indexing.
$ grep -nr temorary matrixStats
matrixStats/src/diff2_lowlevel_template.h:117:    /* Deallocate temorary work vector */
$ 
spaette commented 5 months ago

@HenrikBengtsson

a draft shell script

doesn't include any changes to

NEWS.md inst/WORDLIST revdep/R_MATRIXSTATS_USENAMES_NA=defunct/problems.md src/rowRanksWithTies_lowlevel_template.h (HISTORY)

$ cat typos.sh
#!/bin/sh

sed -i "s/Standarized/Standardized/g" matrixStats/R/rowWeightedMeans.R
sed -i "s/accomodate/accommodate/g" matrixStats/src/rowRanksWithTies.c
sed -i "s/bounderies/boundaries/g" matrixStats/tests/binMeans,binCounts.R
sed -i "s/bounderies/boundaries/g" matrixStats/tests/binCounts.R
sed -i "s/boundery/boundary/g" matrixStats/tests/binMeans,binCounts.R
sed -i "s/boundery/boundary/g" matrixStats/tests/binCounts.R
sed -i "s/coersing/coercing/g" matrixStats/tests/sum2.R
sed -i "s/contigous/contiguous/g" matrixStats/src/logSumExp_lowlevel_template.h
sed -i "s/ideomatic/idiomatic/g" matrixStats/src/rowRanksWithTies_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowCumprods_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowVars_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/colCounts_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowSums2_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowCumsums_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowMeans2_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowMads_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowMedians_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowCumMinMaxs_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/colRanges_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/x_OP_y_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowDiffs_lowlevel_template.h
sed -i "s/indicies/indices/g" matrixStats/src/rowCounts_lowlevel_template.h
sed -i "s/infite/infinite/g" matrixStats/src/weightedMedian_lowlevel_template.h
sed -i "s/noticibly/noticeably/g" matrixStats/src/logSumExp_lowlevel_template.h
sed -i "s/optimiztion/optimization/g" matrixStats/src/000.templates-types.h
sed -i "s/positve/positive/g" matrixStats/src/validateIndices.c
sed -i "s/temorary/temporary/g" matrixStats/src/diff2_lowlevel_template.h
$ 
HenrikBengtsson commented 5 months ago

Thank you so much. We'll get this in for the next release.

spaette commented 5 months ago

you are authorised to use and/or modify the shell script

doesn't include any changes to

NEWS.md inst/WORDLIST revdep/R_MATRIXSTATS_USENAMES_NA=defunct/problems.md src/rowRanksWithTies_lowlevel_template.h (HISTORY)

sed -i "s/deprecatated/deprecated/g" matrixStats/NEWS.md
sed -i "/deprecatated/d" matrixStats/inst/WORDLIST

no sed command provided here for problems.md

sed -i "s/Extened tempate/Extended template/g" matrixStats/src/rowRanksWithTies_lowlevel_template.h
HenrikBengtsson commented 5 months ago

Thanks a bunch. Your fixes have been deployed (commit 3987beb984).

Should typos in HISTORY be fixed?

Yes, I guess. OTH, we could probably remove the HISTORY source-code comment at some point, because I think the info, or at least part of it, are in the svn logs, which we later migrated to git. Anyway, I'll punt on that task for now.

spaette commented 5 months ago

reproduced terminal output

Ticket opened in that repo notifying of the typo in their message.

HenrikBengtsson commented 5 months ago

reproduced terminal output

Ticket opened in that repo notifying of the typo in their message.

This part I did/do not understand

spaette commented 5 months ago

revdep/R_MATRIXSTATS_USENAMES_NA=defunct/problems.md line 9233

typo recomended originates in another package

$ sed -n '511,527p' seurat-object/R/zzz.R
      msg <- paste(
        sQuote(x = pkgname),
        "was built",
        switch(
          EXPR = i,
          R = "under R",
          paste("with package", sQuote(x = i))
        ),
        .BuiltWith[i],
        "but the current version is",
        paste0(current, ';'),
        "it is recomended that you reinstall ",
        sQuote(x = pkgname),
        " as the ABI for",
        switch(EXPR = i, R = i, sQuote(x = i)),
        "may have changed"
      )
$