dd a '-n' option to ministat, which causes it to display only summary
statistics, not graph and statistical test output. Useful for automated processing.
This commit is contained in:
parent
83b3d58d05
commit
cd05b0f7a1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146689
@ -501,7 +501,7 @@ usage(char const *whine)
|
|||||||
|
|
||||||
fprintf(stderr, "%s\n", whine);
|
fprintf(stderr, "%s\n", whine);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: ministat [ -c confidence ] [-s] [file [file ...]]\n");
|
"Usage: ministat [ -c confidence ] [-ns] [file [file ...]]\n");
|
||||||
fprintf(stderr, "\tconfidence = {");
|
fprintf(stderr, "\tconfidence = {");
|
||||||
for (i = 0; i < NCONF; i++) {
|
for (i = 0; i < NCONF; i++) {
|
||||||
fprintf(stderr, "%s%g%%",
|
fprintf(stderr, "%s%g%%",
|
||||||
@ -509,6 +509,7 @@ usage(char const *whine)
|
|||||||
studentpct[i]);
|
studentpct[i]);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "}\n");
|
fprintf(stderr, "}\n");
|
||||||
|
fprintf(stderr, "\t-n : print summary statistics only, no graph/test\n");
|
||||||
fprintf(stderr, "\t-s : print avg/median/stddev bars on separate lines\n");
|
fprintf(stderr, "\t-s : print avg/median/stddev bars on separate lines\n");
|
||||||
exit (2);
|
exit (2);
|
||||||
}
|
}
|
||||||
@ -522,9 +523,10 @@ main(int argc, char **argv)
|
|||||||
char *p;
|
char *p;
|
||||||
int c, i, ci;
|
int c, i, ci;
|
||||||
int flag_s = 0;
|
int flag_s = 0;
|
||||||
|
int flag_n = 0;
|
||||||
|
|
||||||
ci = -1;
|
ci = -1;
|
||||||
while ((c = getopt(argc, argv, "c:s")) != -1)
|
while ((c = getopt(argc, argv, "c:sn")) != -1)
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
a = strtod(optarg, &p);
|
a = strtod(optarg, &p);
|
||||||
@ -536,6 +538,9 @@ main(int argc, char **argv)
|
|||||||
if (ci == -1)
|
if (ci == -1)
|
||||||
usage("No support for confidence level");
|
usage("No support for confidence level");
|
||||||
break;
|
break;
|
||||||
|
case 'n':
|
||||||
|
flag_n = 1;
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
flag_s = 1;
|
flag_s = 1;
|
||||||
break;
|
break;
|
||||||
@ -562,17 +567,20 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetupPlot(74, flag_s);
|
if (!flag_n) {
|
||||||
for (i = 0; i < nds; i++)
|
SetupPlot(74, flag_s);
|
||||||
DimPlot(ds[i]);
|
for (i = 0; i < nds; i++)
|
||||||
for (i = 0; i < nds; i++)
|
DimPlot(ds[i]);
|
||||||
PlotSet(ds[i], i + 1);
|
for (i = 0; i < nds; i++)
|
||||||
DumpPlot();
|
PlotSet(ds[i], i + 1);
|
||||||
|
DumpPlot();
|
||||||
|
}
|
||||||
VitalsHead();
|
VitalsHead();
|
||||||
Vitals(ds[0], 1);
|
Vitals(ds[0], 1);
|
||||||
for (i = 1; i < nds; i++) {
|
for (i = 1; i < nds; i++) {
|
||||||
Vitals(ds[i], i + 1);
|
Vitals(ds[i], i + 1);
|
||||||
Relative(ds[i], ds[0], ci);
|
if (!flag_n)
|
||||||
|
Relative(ds[i], ds[0], ci);
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
@ -501,7 +501,7 @@ usage(char const *whine)
|
|||||||
|
|
||||||
fprintf(stderr, "%s\n", whine);
|
fprintf(stderr, "%s\n", whine);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: ministat [ -c confidence ] [-s] [file [file ...]]\n");
|
"Usage: ministat [ -c confidence ] [-ns] [file [file ...]]\n");
|
||||||
fprintf(stderr, "\tconfidence = {");
|
fprintf(stderr, "\tconfidence = {");
|
||||||
for (i = 0; i < NCONF; i++) {
|
for (i = 0; i < NCONF; i++) {
|
||||||
fprintf(stderr, "%s%g%%",
|
fprintf(stderr, "%s%g%%",
|
||||||
@ -509,6 +509,7 @@ usage(char const *whine)
|
|||||||
studentpct[i]);
|
studentpct[i]);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "}\n");
|
fprintf(stderr, "}\n");
|
||||||
|
fprintf(stderr, "\t-n : print summary statistics only, no graph/test\n");
|
||||||
fprintf(stderr, "\t-s : print avg/median/stddev bars on separate lines\n");
|
fprintf(stderr, "\t-s : print avg/median/stddev bars on separate lines\n");
|
||||||
exit (2);
|
exit (2);
|
||||||
}
|
}
|
||||||
@ -522,9 +523,10 @@ main(int argc, char **argv)
|
|||||||
char *p;
|
char *p;
|
||||||
int c, i, ci;
|
int c, i, ci;
|
||||||
int flag_s = 0;
|
int flag_s = 0;
|
||||||
|
int flag_n = 0;
|
||||||
|
|
||||||
ci = -1;
|
ci = -1;
|
||||||
while ((c = getopt(argc, argv, "c:s")) != -1)
|
while ((c = getopt(argc, argv, "c:sn")) != -1)
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
case 'c':
|
||||||
a = strtod(optarg, &p);
|
a = strtod(optarg, &p);
|
||||||
@ -536,6 +538,9 @@ main(int argc, char **argv)
|
|||||||
if (ci == -1)
|
if (ci == -1)
|
||||||
usage("No support for confidence level");
|
usage("No support for confidence level");
|
||||||
break;
|
break;
|
||||||
|
case 'n':
|
||||||
|
flag_n = 1;
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
flag_s = 1;
|
flag_s = 1;
|
||||||
break;
|
break;
|
||||||
@ -562,17 +567,20 @@ main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetupPlot(74, flag_s);
|
if (!flag_n) {
|
||||||
for (i = 0; i < nds; i++)
|
SetupPlot(74, flag_s);
|
||||||
DimPlot(ds[i]);
|
for (i = 0; i < nds; i++)
|
||||||
for (i = 0; i < nds; i++)
|
DimPlot(ds[i]);
|
||||||
PlotSet(ds[i], i + 1);
|
for (i = 0; i < nds; i++)
|
||||||
DumpPlot();
|
PlotSet(ds[i], i + 1);
|
||||||
|
DumpPlot();
|
||||||
|
}
|
||||||
VitalsHead();
|
VitalsHead();
|
||||||
Vitals(ds[0], 1);
|
Vitals(ds[0], 1);
|
||||||
for (i = 1; i < nds; i++) {
|
for (i = 1; i < nds; i++) {
|
||||||
Vitals(ds[i], i + 1);
|
Vitals(ds[i], i + 1);
|
||||||
Relative(ds[i], ds[0], ci);
|
if (!flag_n)
|
||||||
|
Relative(ds[i], ds[0], ci);
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user