| 1 |
#ifndef _Table_extensions_h_ |
| 2 |
#define _Table_extensions_h_ |
| 3 |
/* Table_extensions.h |
| 4 |
* |
| 5 |
* Copyright (C) 1993-2023 David Weenink |
| 6 |
* |
| 7 |
* This code is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation; either version 2 of the License, or (at |
| 10 |
* your option) any later version. |
| 11 |
* |
| 12 |
* This code is distributed in the hope that it will be useful, but |
| 13 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
* General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
*/ |
| 20 |
|
| 21 |
/* |
| 22 |
djmw 20020411 initial GPL |
| 23 |
djmw 20131220 Latest modification. |
| 24 |
*/ |
| 25 |
|
| 26 |
/* |
| 27 |
TODO : 15/8/23 harmonize all arguments columnnames + columnnumbers |
| 28 |
*/ |
| 29 |
#include "TableOfReal.h" |
| 30 |
#include "Collection.h" |
| 31 |
#include "Categories.h" |
| 32 |
#include "FileInMemory.h" |
| 33 |
#include "Strings_.h" |
| 34 |
#include "SSCP.h" |
| 35 |
#include "Table.h" |
| 36 |
|
| 37 |
autoTable Table_extractRowsWhere (Table me, conststring32 formula, Interpreter interpreter); |
| 38 |
autoTable Table_extractRowsWhere_e (Table me, conststring32 formula, Interpreter interpreter); |
| 39 |
|
| 40 |
autoTable Table_extractColumnsByNumber (Table me, constINTVECVU const& columnNumbers); |
| 41 |
|
| 42 |
integer Table_getNumberOfRowsWhere (Table me, conststring32 formula, Interpreter interpreter); |
| 43 |
|
| 44 |
autoINTVEC Table_listRowNumbersWhere (Table me, conststring32 formula, Interpreter interpreter); |
| 45 |
|
| 46 |
autoVEC Table_getColumnVector (Table me, integer columnNumber); |
| 47 |
|
| 48 |
autoTable Table_create_petersonBarney1952 (); |
| 49 |
|
| 50 |
autoTable Table_create_hillenbrandEtAl1995 (); |
| 51 |
|
| 52 |
autoTable Table_create_polsVanNierop1973 (); |
| 53 |
|
| 54 |
autoTable Table_create_weenink1983 (); |
| 55 |
|
| 56 |
autoTable Table_create_keatingEsposito2006 (); |
| 57 |
|
| 58 |
autoTable Table_create_ganong1980 (); |
| 59 |
|
| 60 |
autoTable FileInMemorySet_downto_Table (FileInMemorySet me, bool openFilesOnly); |
| 61 |
|
| 62 |
double Table_getMedianAbsoluteDeviation (Table me, integer columnNumber); |
| 63 |
|
| 64 |
void Table_reportHuberMStatistics (Table me, integer columnNumber, double k_std, double tol, double *out_location, double *out_scale, integer maximumNumberOfiterations); |
| 65 |
|
| 66 |
// Two one-way tests for normal and non-normally distributed data, respectively. |
| 67 |
autoTable Table_getOneWayAnalysisOfVarianceF (Table me, |
| 68 |
integer column, integer groupColumn, autoTable *means, autoTable *meansDiff, autoTable *meansDiffProbabilities |
| 69 |
); |
| 70 |
|
| 71 |
autoTable Table_getOneWayKruskalWallis (Table me, |
| 72 |
integer column, integer factorColumn, double *p_prob, double *p_kruskalWallis, double *p_df |
| 73 |
); |
| 74 |
|
| 75 |
autoTable Table_getTwoWayAnalysisOfVarianceF (Table me, |
| 76 |
integer column, integer groupColumnA, integer groupColumnB, autoTable *means, autoTable *factorLevelSizes |
| 77 |
); |
| 78 |
|
| 79 |
void Table_verticalErrorBarsPlot (Table me, Graphics g, integer xcolumn, integer ycolumn, double xmin, double xmax, |
| 80 |
double ymin, double ymax, integer yci_min, integer yci_max, double bar_mm, bool garnish |
| 81 |
); |
| 82 |
|
| 83 |
void Table_horizontalErrorBarsPlot (Table me, Graphics g, integer xcolumn, integer ycolumn, double xmin, double xmax, |
| 84 |
double ymin, double ymax, integer xci_min, integer xci_max, double bar_mm, bool garnish |
| 85 |
); |
| 86 |
|
| 87 |
void Table_normalProbabilityPlot (Table me, Graphics g, |
| 88 |
integer column, integer numberOfQuantiles, double numberOfSigmas, double labelSize, conststring32 label, bool garnish |
| 89 |
); |
| 90 |
|
| 91 |
void Table_quantileQuantilePlot (Table me, Graphics g, |
| 92 |
integer xcolumn, integer ycolumn, integer numberOfQuantiles, |
| 93 |
double xmin, double xmax, double ymin, double ymax, double labelSize, conststring32 label, bool garnish |
| 94 |
); |
| 95 |
|
| 96 |
void Table_quantileQuantilePlot_betweenLevels (Table me, Graphics g, |
| 97 |
integer dataColumn, integer factorColumn, conststring32 xlevel, conststring32 ylevel, integer numberOfQuantiles, |
| 98 |
double xmin, double xmax, double ymin, double ymax, double labelSize, conststring32 label, bool garnish |
| 99 |
); |
| 100 |
|
| 101 |
void Table_boxPlots (Table me, Graphics g, |
| 102 |
integer dataColumn, integer factorColumn, double ymin, double ymax, bool garnish); |
| 103 |
|
| 104 |
void Table_boxPlots (Table me, Graphics g, |
| 105 |
constINTVEC const& dataColumnNumbers, integer factorColumn, |
| 106 |
double ymin, double ymax, bool garnish |
| 107 |
); |
| 108 |
|
| 109 |
void Table_distributionPlot (Table me, Graphics g, |
| 110 |
integer dataColumn, double minimum, double maximum, integer nBins, |
| 111 |
double freqMin, double freqMax, bool garnish |
| 112 |
); |
| 113 |
|
| 114 |
void Table_barPlot (Table me, Graphics g, |
| 115 |
constINTVEC columnNumbers, double ymin, double ymax, integer labelColumnNumber, |
| 116 |
double xoffsetFraction, double interbarFraction, double interbarsFraction, constSTRVEC colours, |
| 117 |
double angle, bool garnish |
| 118 |
); |
| 119 |
|
| 120 |
void Table_lineGraph (Table me, Graphics g, |
| 121 |
integer xcolumn, double xmin, double xmax, integer ycolumn, double ymin, double ymax, |
| 122 |
conststring32 symbol, double symbolFontSize, double angle, bool garnish |
| 123 |
); |
| 124 |
|
| 125 |
void Table_lineGraph_old (Table me, Graphics g, |
| 126 |
integer xcolumn, double xmin, double xmax, integer ycolumn, double ymin, double ymax, |
| 127 |
conststring32 symbol, double angle, bool garnish |
| 128 |
); |
| 129 |
|
| 130 |
void Table_lagPlot (Table me, Graphics g, |
| 131 |
integer column, integer lag, double xmin, double xmax, |
| 132 |
conststring32 symbol, double labelSize, bool garnish |
| 133 |
); |
| 134 |
|
| 135 |
void Table_drawEllipses (Table me, Graphics g, |
| 136 |
integer xcolumn, integer ycolumn, integer labelcolumn, double xmin, double xmax, double ymin, double ymax, |
| 137 |
double numberOfSigmas, double labelSize, bool garnish |
| 138 |
); |
| 139 |
|
| 140 |
autoTable Table_extractMahalanobis (Table me, INTVEC const& columnNumbers, |
| 141 |
kMelder_number which, double numberOfSigmas, integer factorColumn); |
| 142 |
|
| 143 |
void Table_printAsAnovaTable (Table me); |
| 144 |
|
| 145 |
void Table_printAsMeansTable (Table me); |
| 146 |
|
| 147 |
#endif // _Table_extensions_h_ |