rowDist, which supports a number of functions, was overhauled to address confusion in the documentation, and in my head, about distances vs. similarities. Also, different definitions found in the literature were documented more clearly. The Minkowski distance option was removed (ask if you want it back), code was cleaned up, documentation greatly improved, an example was added and unit tests were added. Plot scales were also corrected as necessary. Depending upon which distance option is chosen, this change affects hcaSpectra, plotSpectraDist, sampleDist and hcaScores in package ChemoSpec as well as hats_alignSpectra2D and hcaScores in package ChemoSpec2D..shrinkLeaf now shrinks the size of leaf labels more aggressively as the number of samples increases.ChemoSpec and ChemoSpec2D.removeFreq.Spectra now accepts a formula for rem.freq.sampleDist, distPlot, sampleDist.Spectra and sampleDist.Spectra2D; sampleDist.Spectra moved here from ChemoSpec or created anew, with changes to the plot details for consistency between the two classes..getLimits now knows how to handle negative values in the formulas.sumSpectra.Spectra now respects/accepts the ... argument, used to pass tol. This was accidentally disabled. ## Misc.chkSpectra methods now check for duplicated sample names.plotScores now accepts user supplied values for xlim and/or ylim; the default calculation is still available.tinytest.rowDist(..., method = "cosine") now has a unit test.dontrun sections in examples, needed for last submission.getVarExplained handles this common task for all data reduction methods.plotScree.mia was eliminated via the introduction of .getVarExplained and small changes to plotScree.default.conColScheme was moved from ChemoSpec to ChemoSpecUtils so it could be readily available for Spectra2D objects. It was also re-written in the style of updateGroups for consistency and user-friendliness.colorSymbol was moved from ChemoSpec to ChemoSpecUtils.plotScores was fixed. This was a long standing bug that somehow escaped notice (dating to the first few months of ChemoSpec!)..getVarExplained was returning the eigenvalues, not the percent variance explained, for class(mia). This affected scree plots for class(mia) in ChemoSpec2D.plotScores was no longer including the percent variance explained in score plots, if xlab and/or ylab were not provided. Fixed.chkSpectra.Spectra2D would fail if there was only one sample when checking to see if NAs were present in the same positions across all data sets. Fixed.rowDist. The previous version was giving slightly wrong answers.updateGroups now reports the old groups if new.grps = NULL, as intended and claimed in the documentation.plotScree now knows what to do with class princomp..chkArgs since errors were introduced via the most recent “fix”! Updated unit tests for the function, but even more work should be done there. Using HandyStuff::examplePage to look for errors and warnings. None found..chkArgs(mode = 13) that was giving an error in ChemoSpec::r_pcaSpectra.updateGroups..groupNcolor (the problem seems to have been present from the very first version of ChemoSpec). Reported by Reinhard Kerschner (many thanks!).check4Gaps gap checking more robust, with better examples and documentation. If no gap found, a data frame with one row is returned. In turn, this required changes over in .binData and binSpectra which are in ChemoSpec. In addition, while check4Gaps still accepts an argument tol no other functions are using it, and a much more suitable default value is computed in check4Gaps rather than being computed in another function and passed here..chkArgs.sumSpectra output format.removeGroup and removeSample go full S3 dispatch for consistency among the three packages.ChemoSpec2D.hcaScores moved from ChemoSpec and converted to S3 dispatch.chkArgs and associated unit tests added, but it is not yet used in any of the other functions.Seems to work correctly on behalf of ChemoSpec and ChemoSpec2D devel versions.
chkSpectra, removeFreq, sumSpectra, sumGroups.ChemoSpec2D for CRAN, temporarily.ChemoSpec >= 5.0..groupNcolor added with argument mode.addLegend gets an example.