Package: matrixStats
====================

Version: 0.13.1 [2015-01-21]
o BUG FIX: diff2() with differences >= 3 would *read* spurious values
  beyond the allocated memory.  This error, introduced in 0.13.0, was
  harmless in the sense that the returned value was unaffected and still
  correct.  Thanks to Brian Ripley and the CRAN check tools for catching
  this.  I could reproduce it locally with 'valgrind'.


Version: 0.13.0 [2015-01-20]
o Added iqrDiff() and (col|row)IqrDiffs().
o CONSISTENCY: Now rowQuantiles(x, na.rm=TRUE) returns all NAs for rows
  with missing values.  Analogously for colQuantiles(), colIQRs(),
  rowIQRs() and iqr().  Previously, all these functions gave an error
  saying missing values are not allowed.
o SPEEDUP: (col|row)Diffs() are now implemented in native code
  and notably faster than diff() for matrices.
o SPEEDUP: Added diff2(), which is notably faster than base::diff()
  for vectors, which it is designed for.
o DOCUMENTATION: Added vignette summarizing available functions.
o COMPLETENESS: Added corresponding "missing" vector functions for
  already existing column and row functions.  Similarly, added
  "missing" column and row functions for already existing vector
  functions, e.g. added iqr() and count() to complement already
  existing (col|row)IQRs() and (col|row)Counts() functions.
o SPEEDUP: Made binCounts() and binMeans() a bit faster.
o SPEEDUP: Added count(x, value) which is a notably faster
  than sum(x == value).  This can also be used to count missing
  values etc.  Also, added allValue() and anyValue() for
  all(x == value) and any(x == value).
o SPEEDUP: Implemented weightedMedian() in native code, which made
  it ~3-10 times faster.   Dropped support for ties="both", because
  it would have to return two values in case of ties, which made
  the API unnecessarily complicated.  If really needed, then call
  the function twice with ties="min" and ties="max".
o SPEEDUP: Added weightedMean(), which is ~10 times faster than
  stats::weighted.mean().
o SPEEDUP: (col|row)Anys() and (col|row)Alls() is now notably
  faster compared to previous versions.
o SPEEDUP/CLEANUP: Turned several S3 and S4 methods into plain R
  functions, which decreases the overhead of calling the functions.
  After this there are no longer any S3 methods.  Remaining
  S4 methods are anyMissing() and rowMedians().
o ROBUSTNESS: Now column and row methods give slightly more informative
  error messages if a data.frame is passed instead of a matrix.
o CLEANUP: In the effort of migrating anyMissing() into a plain R
  function, the specific anyMissing() implementations for data.frame:s
  and and list:s were dropped and is now handled by anyMissing()
  for "ANY", which is the only S4 method remaining now.  In a near
  future release, this remaining "ANY" method will turned into a plain
  R function and the current S4 generic will be dropped.  We know of
  know CRAN and Bioconductor packages that relies on it being a generic
  function.  Note also that since R (>= 3.1.0) there is a base::anyNA()
  function that does the exact same thing making anyMissing() obsolete.
o BUG FIX: weightedMedian(..., ties="both") would give an error
  if there was a tie.  Added package test for this case.


Version: 0.12.2 [2014-12-07]
o CODE FIX: The native code for product() on integer vector
  incorrectly used C-level abs() on intermediate values despite
  those being doubles requiring fabs().  Despite this, the calculated
  product would still be correct (at least when validated on several
  local setups as well as on the CRAN servers).  Again, thanks to
  Brian Ripley for pointing out another invalid integer-double
  coersion at the C level.


Version: 0.12.1 [2014-12-06]
o ROBUSTNESS: Updated package tests to check methods in more
  scenarios, especially with both integer and numeric input data.
o BUG FIX: (col|row)Cumsums(x) where 'x' is integer would return
  garbage for columns (rows) containing missing values.
o BUG FIX: rowMads(x) where 'x' is numeric (not integer) would give
  incorrect results for rows that had an *odd* number of values
  (no ties).  Analogously issues with colMads(). Added package tests
  for such cases too.  Thanks to Brian Ripley and the CRAN check tools
  for (yet again) catching another coding mistake.  Details: This was
  because the C-level calculation of the absolute value of residuals
  toward the median would use integer-based abs() rather than double-
  based fabs(). Now it fabs() is used when the values are double and
  abs() when they are integers.


Version: 0.12.0 [2014-12-05]
o Submitted to CRAN.


Version: 0.11.9 [2014-11-26]
o Added (col|row)Cumsums(), (col|row)Cumprods(), (col|row)Cummins(),
  and (col|row)Cummaxs().
o BUG FIX: (col|row)WeightedMeans() with all zero weights gave
  mean estimates with values 0 instead of NaN.


Version: 0.11.8 [2014-11-25]
o SPEEDUP: Implemented (col|row)Mads(), (col|row)Sds() and
  (col|row)Vars() in native code.
o SPEEDUP: Made (col|row)Quantiles(x) faster for 'x' without
  missing values (and default type=7L quantiles).  It should
  still be implemented in native code.
o SPEEDUP: Made rowWeightedMeans() faster.
o BUG FIX: (col|row)Medians(x) when 'x' is integer would give
  invalid median values in case (a) it was calculated as the mean
  of two values ("ties"), and (b) the sum of those values where
  greater than .Machine$integer.max.  Now such ties are calculated
  using floating point precision.  Add lots of package tests.


Version: 0.11.6 [2014-11-16]
o SPEEDUP: Now (col|row)Mins(), (col|row)Maxs() and (col|row)Ranges()
  are implemented in native code providing a significant speedup.
o SPEEDUP: Now colOrderStats() also is implemented in native code,
  which indirectly makes colMins(), colMaxs() and colRanges() faster.
o SPEEDUP: colTabulates(x) no longer uses rowTabulates(t(x)).
o SPEEDUP: colQuantiles(x) no longer uses rowQuantiles(t(x)).
o CLEANUP: Argument 'flavor' of (col|row)Ranks() is now ignored.


Version: 0.11.5 [2014-11-15]
o SPEEDUP: Now colCollapse(x) no longer utilizes rowCollapse(t(x)).
  Added package tests for (col|row)Collapse().
o SPEEDUP: Now colDiffs(x) no longer uses rowDiffs(t(x)).
  Added package tests for (col|row)Diffs().
o SPEEDUP: Package no longer utilizes match.arg() due to
  its overhead; methods sumOver(), (col|row)Prods() and
  (col|row)Ranks() were updated.
o (col|row)Prods() now uses default method="direct" (was "expSumLog").


Version: 0.11.4 [2014-11-14]
o Added support for vector input to several of the row- and column methods
  as long as the "intended" matrix dimension is specified via argument
  'dim'.  For instance, rowCounts(x, dim=c(nrow, ncol)) is the same
  as rowCounts(matrix(x, nrow, ncol)), but more efficient since it
  avoids creating/allocating a temporary matrix.
o SPEEDUP: Now colCounts() is implemented in native code.  Moreover,
  (col|row)Counts() are now also implemented in native code for
  logical input (previously only for integer and double input).
  Added more package tests and benchmarks for these functions.


Version: 0.11.3 [2014-11-11]
o Turned sdDiff(),  madDiff(), varDiff(), weightedSd(), weightedVar()
  and weightedMad() into plain functions (were generic functions).
o Removed unnecessary usage of '::'.


Version: 0.11.2 [2014-11-09]
o SPEEDUP: Implemented indexByRow() in native code and it is no longer
  a generic function, but a regular function, which is also faster to
  call.  The first argument of indexByRow() has been changed to 'dim'
  such that one should use indexByRow(dim(X)) instead of indexByRow(X)
  as in the past.  The latter form is still supported, but deprecated.
o Added allocVector(), allocMatrix() and allocArray() for faster
  allocation numeric vectors, matrices and arrays, particularly when
  filled with non-missing values.


Version: 0.11.1 [2014-11-07]
o Better support for long vectors.
o ROBUSTNESS: Although unlikely, with long vectors support for binCounts()
  and binMeans() it is possible that a bin gets a higher count than what
  can be represented by an R integer (.Machine$integer.max=2^31-1).  If
  that happens, an informative warning is generated and the bin count is
  set to .Machine$integer.max.  If this happens for binMeans(), the
  corresponding mean is still properly calculated and valid.
o PRECISION: Using greater floating-point precision in more internal
  intermediate calculations, where possible.
o CLEANUP: Cleanup and harmonized the internal C API such there are two
  well defined API levels.  The high-level API is called by R via .Call()
  and takes care of most of the argument validation and construction of
  the return value.  This function dispatch to functions in the low-level
  API based on data type(s) and other arguments.  The low-level API is
  written to work with basic C data types only.
o BUG FIX: Package incorrectly redefined R_xlen_t on R (>= 3.0.0) systems
  where LONG_VECTOR_SUPPORT is not supported.


Version: 0.11.0 [2014-11-02]
o Added sumOver() and meanOver(), which are notably faster versions
  of sum(x[idxs]) and mean(x[idxs]).  Moreover, instead of having to do
  sum(as.numeric(x)) to avoid integer overflow when 'x' is an integer
  vector, one can do sumOver(x, mode="numeric"), which avoids the extra
  copy created when coercing to numeric (this numeric copy is also twice
  as large as the integer vector).  Added package tests and benchmark
  reports for these functions.


Version: 0.10.4 [2014-11-01]
o SPEEDUP: Made anyMissing(), logSumExp(), (col|row)Medians(),
  (col|row)Counts() slightly faster by making the native code assign
  the results directly to the native vector instead of to the R vector,
  e.g. ansp[i] = v where ansp=REAL(ans) instead of REAL(ans)[i] = v.
o Added benchmark reports for anyMissing() and logSumExp().


Version: 0.10.3 [2014-10-01]
o BUG FIX: binMeans() returned 0.0 instead of NA_real_ for empty bins.


Version: 0.10.2 [2014-09-01]
o BUG FIX: On some systems, the package failed to build on R (<= 2.15.3)
  with compilation error: "redefinition of typedef 'R_xlen_t'".


Version: 0.10.1 [2014-06-09]
o Added benchmark reports for also non-matrixStats functions col/rowSums()
  and col/rowMeans().
o Now all colNnn() and rowNnn() methods are benchmarked in a combined
  report making it possible to also compare colNnn(x) with rowNnn(t(x)).


Version: 0.10.0 [2014-06-07]
o BUG FIX: The package tests for product() incorrectly assumed that the
  value of prod(c(NaN, NA)) is uniquely defined.  However, as documented
  in help("is.nan"), it may be NA or NaN depending on R system/platform.
o Relaxed some packages tests such that they assert numerical
  correctness via all.equal() rather than identical().
o Submitted to CRAN.


Version: 0.9.7 [2014-06-05]
o BUG FIX: Introduced a bug in v0.9.5 causing col- and rowVars() and
  hence also col- and rowSds() to return garbage.  Add package tests
  for these now.
o Submitted to CRAN.


Version: 0.9.6 [2014-06-04]
o SPEEDUP: Now col- and rowProds() utilizes new product() function.
o SPEEDUP: Added product() for calculating the product of a numeric
  vector via the logarithm.
o Added signTabulate() for tabulating the number of negatives, zeros,
  positives and missing values.  For doubles, the number of negative
  and positive infinite values are also counted.


Version: 0.9.5 [2014-06-04]
o Added argument 'method' to col- and rowProds() for controlling how
  the product is calculated.
o SPEEDUP: Package is now byte compiled.
o SPEEDUP: Made weightedMedian() a plain function (was an S3 method).
o SPEEDUP: Made rowProds() and rowTabulates() notably faster.
o SPEEDUP: Now rowCounts(), rowAnys(), rowAlls() and corresponding
  column methods can search for any value in addition to the
  default TRUE.  The search for a matching integer or double value
  is done in native code, which is notably faster (and more
  memory efficient because it avoids creating any new objects).
o SPEEDUP: Made colVars() and colSds() notably faster and
  rowVars() and rowSds() a slightly bit faster.
o SPEEDUP: Turned more S4 methods into S3 methods, e.g. rowCounts(),
  rowAlls(), rowAnys(), rowTabulates() and rowCollapse().
o Added benchmark reports, e.g. matrixStats:::benchmark('colMins').
o CLEANUP: Now only exporting plain functions and generic functions.


Version: 0.9.4 [2014-05-23]
o SPEEDUP: Turned several S4 methods into S3 methods, e.g.
  indexByRow(), madDiff(), sdDiff() and varDiff().


Version: 0.9.3 [2014-04-26]
o Added argument 'trim' to madDiff(), sdDiff() and varDiff().


Version: 0.9.2 [2014-04-04]
o BUG FIX: The native code of binMeans(x, bx) would try to access
  an out-of-bounds value of argument 'y' iff 'x' contained elements
  that are left of all bins in 'bx'.  This bug had no impact on the
  results and since no assignment was done it should also not crash/
  core dump R.  This was discovered thanks to new memtests (ASAN and
  valgrind) provided by CRAN.


Version: 0.9.1 [2014-03-31]
o BUG FIX: rowProds() would throw "Error in rowSums(isNeg) : 'x' must
  be an array of at least two dimensions" on matrices where all rows
  contained at least on zero.  Thanks to Roel Verbelen at KU Leuven
  for the report.


Version: 0.9.0 [2014-03-26]
o Added weighedVar() and weightedSd().


Version: 0.8.14 [2013-11-23]
o MEMORY: Updated all functions to do a better job of cleaning out
  temporarily allocated objects as soon as possible such that the
  garbage collector can remove them sooner, iff wanted.  This
  increase the chance for a smaller memory footprint.
o Submitted to CRAN.


Version: 0.8.13 [2013-10-08]
o Added argument 'right' to binCounts() and binMeans() to specify
  whether binning should be done by (u,v] or [u,v).  Added system
  tests validating the correctness of the two cases.
o Bumped up package dependencies.


Version: 0.8.12 [2013-09-26]
o SPEEDUP: Now utilizing anyMissing() everywhere possible.


Version: 0.8.11 [2013-09-21]
o ROBUSTNESS: Now importing 'loadMethod' from 'methods' package such
  that 'matrixStats' S4-based methods also work when 'methods' is
  not loaded, e.g. when 'Rscript' is used, cf. Section 'Default
  packages' in 'R Installation and Administration'.
o ROBUSTNESS: Updates package system tests such that the can run
  with only the 'base' package loaded.


Version: 0.8.10 [2013-09-15]
o CLEANUP: Now only importing two functions from the 'methods' package.
o Bumped up package dependencies.


Version: 0.8.9 [2013-08-29]
o CLEANUP: Now the package startup message acknowledges argument
  'quietly' of library()/require().


Version: 0.8.8 [2013-07-29]
o DOCUMENTATION: The dimension of the return value was swapped
  in help("rowQuantiles").


Version: 0.8.7 [2013-07-28]
o SPEEDUP: Made (col|row)Mins() and (col|row)Maxs() much faster.
o BUG FIX: rowRanges(x) on an Nx0 matrix would give an error.
  Same for colRanges(x) on an 0xN matrix.  Added system tests
  for these and other special cases.


Version: 0.8.6 [2013-07-20]
o Forgot to declare S3 methods (col|row)WeightedMedians().
o Bumped up package dependencies.


Version: 0.8.5 [2013-05-25]
o Minor speedup of (col|row)Tabulates() by replacing rm() calls
  with NULL assignments.


Version: 0.8.4 [2013-05-20]
o CRAN POLICY: Now all Rd \usage{} lines are at most 90 characters long.


Version: 0.8.3 [2013-05-10]
o SPEEDUP: binCounts() and binMeans() now uses Hoare's Quicksort
  for presorting 'x' before counting/averaging.  They also no longer
  test in every iteration (=for every data point) whether the last
  bin has been reached or not, but only after completing a bin.


Version: 0.8.2 [2013-05-02]
o DOCUMENTATION: Minor corrections and updates to help pages.


Version: 0.8.1 [2013-05-02]
o BUG FIX: Native code of logSumExp() used an invalid check for
  missing value of an integer argument.  Detected by Brian Ripley
  upon CRAN submission.


Version: 0.8.0 [2013-05-01]
o Added logSumExp(lx) and (col|row)LogSumExps(lx) for accurately
  computing of log(sum(exp(lx))) for standalone vectors, and
  row and column vectors of matrices. Thanks to Nakayama (Japan)
  for the suggestion and contributing a draft in R.


Version: 0.7.1 [2013-04-23]
o Added argument 'preserveShape' to colRanks().  For backward
  compatibility the default is preserveShape=FALSE, but it may
  change in the future.
o BUG FIX: Since v0.6.4, (col|row)Ranks() gave the incorrect
  results for integer matrices with missing values.
o BUG FIX: Since v0.6.4, (col|row)Medians() for integers would
  calculate ties as floor(tieAvg).


Version: 0.7.0 [2013-01-14]
o Now (col|row)Ranks() support "max" (default), "min" and
  "average" for argument 'ties.method'.  Added system tests
  validation these cases.  Thanks Peter Langfelder (UCLA) for
  contributing this.


Version: 0.6.4 [2013-01-13]
o Added argument 'ties.method' to rowRanks() and colRanks(), but
  still only support for "max" (as before).
o ROBUSTNESS: Lots of cleanup of the internal/native code.  Native
  code for integer and double cases have been harmonized and are
  now generated from a common code template.  This was inspired by
  code contributions from Peter Langfelder (UCLA).


Version: 0.6.3 [2013-01-13]
o Added anyMissing() for data type 'raw', which always returns FALSE.
o ROBUSTNESS: Added system test for anyMissing().
o ROBUSTNESS: Now S3 methods are declared in the namespace.


Version: 0.6.2 [2012-11-15]
o CRAN POLICY: Made example(weightedMedian) faster.


Version: 0.6.1 [2012-10-10]
o BUG FIX: In some cases binCounts() and binMeans() could try to go
  past the last bin resulting a core dump.
o BUG FIX: binCounts() and binMeans() would return random/garbage
  values for bins that were beyond the last data point.


Version: 0.6.0 [2012-10-04]
o Added binMeans() for fast sample-mean calculation in bins.
  Thanks to Martin Morgan at the Fred Hutchinson Cancer Research
  Center, Seattle, for contributing the core code for this.
o Added binCounts() for fast element counting in bins.


Version: 0.5.3 [2012-09-10]
o CRAN POLICY: Replaced the .Internal(psort(...)) call with
  a call to a new internal partial sorting function, which
  utilizes the native rPsort() part of the R internals.


Version: 0.5.2 [2012-07-02]
o Updated package dependencies to match CRAN.


Version: 0.5.1 [2012-06-25]
o GENERALIZATION: Now (col|row)Prods() handle missing values.
o BUG FIX: In certain cases, (col|row)Prods() would return NA instead
  of 0 for some elements.  Added a redundancy test for the case.
  Thanks Brenton Kenkel at University of Rochester for reporting on this.
o Now this package only imports methods.


Version: 0.5.0 [2012-04-16]
o Added weightedMad() from aroma.core v2.5.0.
o Added weightedMedian() from aroma.light v1.25.2.
o This package no longer depends on the aroma.light package for
  any of its functions.
o Now this package only imports R.methodsS3, meaning it no
  longer loads R.methodsS3 when it is loaded.


Version: 0.4.5 [2012-03-19]
o Updated the default argument 'centers' of rowMads()/colMads()
  to explicitly be (col|row)Medians(x,...).  The  default
  behavior has not changed.


Version: 0.4.4 [2012-03-05]
o BUG FIX: colMads() would return the incorrect estimates. This bug
  was introduced in matrixStats v0.4.0 (2011-11-11).
o ROBUSTNESS: Added system/redundancy tests for rowMads()/colMads().
o CRAN: Made the system tests "lighter" by default, but full tests
  can still be run, cf. tests/*.R scripts.


Version: 0.4.3 [2011-12-11]
o BUG FIX: rowMedians(..., na.rm=TRUE) did not handle NaN (only NA).
  The reason for this was the the native code used ISNA() to test
  for NA and NaN, but it should have been ISNAN(), which is opposite
  to how is.na() and is.nan() at the R level work.  Added system
  tests for this case.


Version: 0.4.2 [2011-11-29]
o Added rowAvgsPerColSet() and colAvgsPerRowSet().


Version: 0.4.1 [2011-11-25]
o Added help pages with an example to rowIQRs() and colIQRs().
o Added example to rowQuantiles().
o BUG FIX: rowIQRs() and colIQRs() would return the 25% and the 75%
  quantiles, not the difference between them.  Thanks Pierre Neuvial
  at CNRS, Evry, France for the report.


Version: 0.4.0 [2011-11-11]
o Added rowRanks() and colRanks().  Thanks Hector Corrada Bravo
  (University of Maryland) and Harris Jaffee (John Hopkins).
o Dropped the previously introduced expansion of 'center' in rowMads()
  and colMads().  It added unnecessary overhead if not needed.


Version: 0.3.0 [2011-10-13]
o SPEEDUP/LESS MEMORY: colMedians(x) no longer uses rowMedians(t(x));
  instead there is now an optimized native-code implementation.
  Also, colMads() utilizes the new colMedians() directly.
  This improvement was kindly contributed by Harris Jaffee at
  Biostatistics of John Hopkins, USA.
o Added additional unit tests for colMedians() and rowMedians().


Version: 0.2.2 [2010-10-06]
o Now the result of (col|row)Quantiles() contains column names.


Version: 0.2.1 [2010-04-05]
o Added a startup message when package is loaded.
o CLEAN UP: Removed obsolete internal .First.lib() and .Last.lib().


Version: 0.2.0 [2010-03-30]
o DOCUMENTATION: Fixed some incorrect cross references.


Version: 0.1.9 [2010-02-03]
o BUG FIX: (col|row)WeightedMeans(..., na.rm=TRUE) would incorrectly
  treat missing values as zeros.  Added corresponding redundancy tests
  (also for the median case).  Thanks Pierre Neuvial for reporting this.


Version: 0.1.8 [2009-11-13]
o BUG FIX: colRanges(x) would return a matrix of wrong dimension
  if 'x' did not have any missing values.  This would affect all
  functions relying on colRanges(), e.g. colMins() and colMaxs().
  Added a redundancy test for this case.  Thanks Pierre Neuvial
  at UC Berkeley for reporting this.
o BUG FIX: (col|row)Ranges() return a matrix with dimension names.


Version: 0.1.7 [2009-06-20]
WORKAROUND: Cannot use "%#x" in rowTabulates() when creating the column
names of the result matrix.  It gave an error OSX with R v2.9.0 devel
(2009-01-13 r47593b) current the OSX server at R-forge.


Version: 0.1.6 [2009-06-17]
o Updated the Rdoc example for rowWeightedMedians() to run conditionally
  on aroma.light, which is only a suggested package - not a required one.
  This in order to prevent R CMD check to fail on CRAN, which prevents
  it for building binaries (as it currently happens on their OSX servers).


Version: 0.1.5 [2009-02-04]
o BUG FIX: For some errors in rowOrderStats(), the stack would not
  become UNPROTECTED before calling error.


Version: 0.1.4 [2009-02-02]
o Added methods (col|row)Weighted(Mean|Median)s() for weighted averaging.
o Added more Rdoc comments.
o Package passes R CMD check flawlessly.


Version: 0.1.3 [2008-07-30]
o Added (col|row)Tabulates() for integer and raw matrices.
o BUG FIX: rowCollapse(x) was broken and returned the wrong elements.


Version: 0.1.2 [2008-04-13]
o Added (col|row)Collapse().
o Added varDiff(), sdDiff() and madDiff().
o Added indexByRow().


Version: 0.1.1 [2008-03-25]
o Added (col|row)OrderStats().
o Added (col|row)Ranges() and (col|row)(Min|Max)s().
o Added colMedians().
o Now anyMissing() support most data types as structures.


Version: 0.1.0 [2007-11-26]
o Imported the rowNnn() methods from Biobase.
o Created.
