X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fexamine.q;h=c930cf01d3a54ecb3217d565230e0d827853bd30;hb=92f198d13c9214c0d75b936f0ea0dc2684ea914b;hp=bf2c3fd17f96fac51778adcbc04604dcce86e17e;hpb=81fff61a96bece351e381ad3fef8ab1248a952ba;p=pspp diff --git a/src/language/stats/examine.q b/src/language/stats/examine.q index bf2c3fd17f..c930cf01d3 100644 --- a/src/language/stats/examine.q +++ b/src/language/stats/examine.q @@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA #include #include #include +#include #include #include #include @@ -63,9 +64,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *^variables=custom; +total=custom; +nototal=custom; - +missing=miss:pairwise/!listwise, - rep:report/!noreport, - incl:include/!exclude; + missing=miss:pairwise/!listwise, + rep:report/!noreport, + incl:include/!exclude; +compare=cmp:variables/!groups; +percentiles=custom; +id=var; @@ -150,7 +151,8 @@ void box_plot_variables(const struct factor *fctr, /* Per Split function */ -static bool run_examine(const struct casefile *cf, void *cmd_); +static bool run_examine(const struct ccase *, + const struct casefile *cf, void *cmd_); static void output_examine(void); @@ -196,7 +198,7 @@ cmd_examine(void) subc_list_double_create(&percentile_list); percentile_algorithm = PC_HAVERAGE; - if ( !parse_examine(&cmd) ) + if ( !parse_examine(&cmd, NULL) ) return CMD_FAILURE; /* If /MISSING=INCLUDE is set, then user missing values are ignored */ @@ -421,7 +423,7 @@ list_to_ptile_hash(const subc_list_double *l) /* Parse the PERCENTILES subcommand */ static int -xmn_custom_percentiles(struct cmd_examine *p UNUSED) +xmn_custom_percentiles(struct cmd_examine *p UNUSED, void *aux UNUSED) { sbc_percentile = 1; @@ -476,7 +478,7 @@ xmn_custom_percentiles(struct cmd_examine *p UNUSED) /* TOTAL and NOTOTAL are simple, mutually exclusive flags */ static int -xmn_custom_total(struct cmd_examine *p) +xmn_custom_total(struct cmd_examine *p, void *aux UNUSED) { if ( p->sbc_nototal ) { @@ -488,7 +490,7 @@ xmn_custom_total(struct cmd_examine *p) } static int -xmn_custom_nototal(struct cmd_examine *p) +xmn_custom_nototal(struct cmd_examine *p, void *aux UNUSED) { if ( p->sbc_total ) { @@ -504,7 +506,7 @@ xmn_custom_nototal(struct cmd_examine *p) /* Parser for the variables sub command Returns 1 on success */ static int -xmn_custom_variables(struct cmd_examine *cmd ) +xmn_custom_variables(struct cmd_examine *cmd, void *aux UNUSED) { lex_match('='); @@ -676,7 +678,7 @@ factor_calc(struct ccase *c, int case_no, double weight, int case_missing) } static bool -run_examine(const struct casefile *cf, void *cmd_ ) +run_examine(const struct ccase *first, const struct casefile *cf, void *cmd_ ) { struct casereader *r; struct ccase c; @@ -684,9 +686,13 @@ run_examine(const struct casefile *cf, void *cmd_ ) const struct cmd_examine *cmd = (struct cmd_examine *) cmd_; + struct factor *fctr; + + output_split_file_values (first); + /* Make sure we haven't got rubbish left over from a previous split */ - struct factor *fctr = factors; + fctr = factors; while (fctr) { struct factor *next = fctr->next;