pivot-output: Really fix formatting of the corner cell.
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 31 Dec 2020 03:45:07 +0000 (19:45 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 31 Dec 2020 03:57:27 +0000 (19:57 -0800)
Commit 981e88e2f5b4 ("pivot-output: Fill corner cell even without
corner text.") purported to do this, but it missed the most
important issue.

src/output/pivot-output.c
tests/language/stats/examine.at
tests/language/stats/logistic.at
tests/language/stats/npar.at
tests/language/stats/oneway.at
tests/language/stats/roc.at

index 44a044b8b0ff3bbc67b321d222aa3d04065f911d..7d5ee7a9fcf5888ddb01cbf438fd00f177a4e9e4 100644 (file)
@@ -289,7 +289,7 @@ compose_headings (struct table *t,
       if (d->root->show_label_in_corner && a_ofs > 0)
         {
           int bb[TABLE_N_AXES][2];
-          bb[a][0] = a_ofs - 1;
+          bb[a][0] = 0;
           bb[a][1] = a_ofs - 1;
           bb[b][0] = bottom_row - d->label_depth + 1;
           bb[b][1] = bottom_row;
index ed7dada4e129df486c1c11558ac7d3190aa41b73..f22a4f5ce4d59c27df83446653397d9a018c98b7 100644 (file)
@@ -115,9 +115,9 @@ Breaking Strain,Mean,,3.54,.32
 ,Kurtosis,,-.36,.92
 
 Table: Case Processing Summary
-,,Cases,,,,,
+,Manufacturer,Cases,,,,,
 ,,Valid,,Missing,,Total,
-,Manufacturer,N,Percent,N,Percent,N,Percent
+,,N,Percent,N,Percent,N,Percent
 Breaking Strain,Aspeger,8.00,100.0%,.00,.0%,8.00,100.0%
 ,Bloggs,8.00,100.0%,.00,.0%,8.00,100.0%
 ,Charlies,8.00,100.0%,.00,.0%,8.00,100.0%
@@ -451,9 +451,9 @@ Table: Case Processing Summary
 x,6,85.7%,1,14.3%,7,100.0%
 
 Table: Case Processing Summary
-,,Cases,,,,,
+,y,Cases,,,,,
 ,,Valid,,Missing,,Total,
-,y,N,Percent,N,Percent,N,Percent
+,,N,Percent,N,Percent,N,Percent
 x,1.00,4,100.0%,0,.0%,4,100.0%
 ,2.00,2,66.7%,1,33.3%,3,100.0%
 ])
@@ -852,9 +852,9 @@ x,F8.0
 g,F8.0
 
 Table: Case Processing Summary
-,,Cases,,,,,
+,g,Cases,,,,,
 ,,Valid,,Missing,,Total,
-,g,N,Percent,N,Percent,N,Percent
+,,N,Percent,N,Percent,N,Percent
 x,.,4,100.0%,0,.0%,4,100.0%
 ,1,9,100.0%,0,.0%,9,100.0%
 ,2,9,100.0%,0,.0%,9,100.0%
@@ -1311,15 +1311,15 @@ examine x  by g
 
 AT_CHECK([pspp -O format=csv shapiro-wilk.sps], [0],[dnl
 Table: Case Processing Summary
-,,Cases,,,,,
+,g,Cases,,,,,
 ,,Valid,,Missing,,Total,
-,g,N,Percent,N,Percent,N,Percent
+,,N,Percent,N,Percent,N,Percent
 x,1.00,10,100.0%,0,.0%,10,100.0%
 ,2.00,10,100.0%,0,.0%,10,100.0%
 
 Table: Tests of Normality
-,,Shapiro-Wilk,,
-,g,Statistic,df,Sig.
+,g,Shapiro-Wilk,,
+,,Statistic,df,Sig.
 x,1.00,.984,10,.983
 ,2.00,.882,10,.136
 ])
index dd68b6c125f65e12048f459d3cdfd470a0239d98..cf413ea6e0c57d3a0acde1e3d126c2bac8c3ddd4 100644 (file)
@@ -131,9 +131,9 @@ Step,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
 1,37.323,.455,.659
 
 Table: Classification Table
-,,,Predicted,,
+,Observed,,Predicted,,
 ,,,outcome,,Percentage Correct
-,Observed,,1.000,2.000,
+,,,1.000,2.000,
 Step 1,outcome,1.000,43,5,89.6%
 ,,2.000,4,14,77.8%
 ,Overall Percentage,,,,86.4%
@@ -294,9 +294,9 @@ Step,-2 Log likelihood,Cox & Snell R Square,Nagelkerke R Square
 1,275.637,.008,.011
 
 Table: Classification Table
-,,,Predicted,,
+,Observed,,Predicted,,
 ,,,female,,Percentage Correct
-,Observed,,.00,1.00,
+,,,.00,1.00,
 Step 1,female,.00,0,91,.0%
 ,,1.00,0,109,100.0%
 ,Overall Percentage,,,,54.5%
@@ -782,9 +782,9 @@ bcat,1.000,61,1,0,0
 ,4.000,67,0,0,0
 
 Table: Classification Table
-,,,Predicted,,
+,Observed,,Predicted,,
 ,,,y,,Percentage Correct
-,Observed,,4.000,9.000,
+,,,4.000,9.000,
 Step 1,y,4.000,254,19,93.0%
 ,,9.000,97,30,23.6%
 ,Overall Percentage,,,,71.0%
@@ -1048,9 +1048,9 @@ ses,a,47,1,0
 ,c,58,0,0
 
 Table: Classification Table
-,,,Predicted,,
+,Observed,,Predicted,,
 ,,,honcomp,,Percentage Correct
-,Observed,,.000,1.000,
+,,,.000,1.000,
 Step 1,honcomp,.000,132,15,89.8%
 ,,1.000,26,27,50.9%
 ,Overall Percentage,,,,79.5%
@@ -1468,9 +1468,9 @@ sector,1.000,117,1,
 ,2.000,79,0,
 
 Table: Classification Table
-,,,Predicted,,
+,Observed,,Predicted,,
 ,,,disease,,Percentage Correct
-,Observed,,.000,1.000,
+,,,.000,1.000,
 Step 1,disease,.000,131,8,94.2%
 ,,1.000,41,16,28.1%
 ,Overall Percentage,,,,75.0%
index e71514c63b8adb6491d5dab8fad8ccb94c84a615..975d993771fea3abe896c78619235dc71bbefd88 100644 (file)
@@ -1241,14 +1241,14 @@ npar tests
 
 AT_CHECK([pspp -O format=csv mcnemar.sps], [0], [dnl
 Table: v1 & v2
-,v2,
-v1,.000,1.000
+v1,v2,
+,.000,1.000
 .000,4,9
 1.000,2,5
 
 Table: v1 & junk
-,junk,
-v1,.000,1.000
+v1,junk,
+,.000,1.000
 .000,8,5
 1.000,2,5
 
@@ -1283,8 +1283,8 @@ NPAR TEST
 
 AT_CHECK([pspp -O format=csv mcnemar.sps], [0], [dnl
 Table: var1 & var2
-,var2,
-var1,0,1
+var1,var2,
+,0,1
 0,9,8
 1,1,5
 
@@ -1293,8 +1293,8 @@ Table: Test Statistics
 var1 & var2,23,.039,.020,.02
 
 Table: var2 & var1
-,var1,
-var2,0,1
+var2,var1,
+,0,1
 0,9,1
 1,8,5
 
index e0f0ea30f3d49db27393412e3e90a5b1d8167fd7..2c11e7ca46b7adbb27261ba82193bb5cfcbce61a 100644 (file)
@@ -54,8 +54,8 @@ ONEWAY
 AT_CHECK([pspp -o pspp.csv -o pspp.txt oneway.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Descriptives
-,,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
-,Manufacturer,,,,,Lower Bound,Upper Bound,,
+,Manufacturer,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
+,,,,,,Lower Bound,Upper Bound,,
 Breaking Strain,Aspeger,5,2.20,1.30,.58,.58,3.82,1.00,4.00
 ,Bloggs,5,3.20,1.30,.58,1.58,4.82,2.00,5.00
 ,Charlies,5,5.00,1.58,.71,3.04,6.96,3.00,7.00
@@ -72,8 +72,8 @@ Breaking Strain,Between Groups,20.13,2,10.07,5.12,.025
 ,Total,43.73,14,,,
 
 Table: Contrast Coefficients
-,Manufacturer,,
-Contrast,Aspeger,Bloggs,Charlies
+Contrast,Manufacturer,,
+,Aspeger,Bloggs,Charlies
 1,-2,1,1
 2,0,-1,1
 
@@ -131,8 +131,8 @@ Variable,Value
 S,1.00
 
 Table: Descriptives
-,,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
-,Manufacturer,,,,,Lower Bound,Upper Bound,,
+,Manufacturer,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
+,,,,,,Lower Bound,Upper Bound,,
 Breaking Strain,Aspeger,5,2.20,1.30,.58,.58,3.82,1.00,4.00
 ,Bloggs,2,3.50,2.12,1.50,-15.56,22.56,2.00,5.00
 ,Total,7,2.57,1.51,.57,1.17,3.97,1.00,5.00
@@ -148,8 +148,8 @@ Breaking Strain,Between Groups,2.41,1,2.41,1.07,.349
 ,Total,13.71,6,,,
 
 Table: Contrast Coefficients
-,Manufacturer,
-Contrast,Aspeger,Bloggs
+Contrast,Manufacturer,
+,Aspeger,Bloggs
 1,-2,2
 2,-1,1
 
@@ -165,8 +165,8 @@ Variable,Value
 S,2.00
 
 Table: Descriptives
-,,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
-,Manufacturer,,,,,Lower Bound,Upper Bound,,
+,Manufacturer,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
+,,,,,,Lower Bound,Upper Bound,,
 Breaking Strain,Bloggs,3,3.00,1.00,.58,.52,5.48,2.00,4.00
 ,Charlies,5,5.00,1.58,.71,3.04,6.96,3.00,7.00
 ,Total,8,4.25,1.67,.59,2.85,5.65,2.00,7.00
@@ -182,8 +182,8 @@ Breaking Strain,Between Groups,7.50,1,7.50,3.75,.101
 ,Total,19.50,7,,,
 
 Table: Contrast Coefficients
-,Manufacturer,
-Contrast,Bloggs,Charlies
+Contrast,Manufacturer,
+,Bloggs,Charlies
 1,-2,2
 2,-1,1
 
@@ -335,8 +335,8 @@ ONEWAY
 
 AT_CHECK([pspp -O format=csv oneway-descriptives.sps], [0],
 [Table: Descriptives
-,,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
-,BRAND,,,,,Lower Bound,Upper Bound,,
+,BRAND,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
+,,,,,,Lower Bound,Upper Bound,,
 QUALITY,11.00,5,12.20,1.30,.58,10.58,13.82,11.00,14.00
 ,25.00,5,13.20,1.30,.58,11.58,14.82,12.00,15.00
 ,301.00,5,15.00,1.58,.71,13.04,16.96,13.00,17.00
@@ -445,8 +445,8 @@ AT_CHECK([pspp -o pspp.csv -o pspp.txt multivar.sps])
 dnl Some machines return 3.88 instead of 3.87 below (see bug #31611).
 AT_CHECK([sed -e 's/^,Within Groups,3.88/,Within Groups,3.87/' pspp.csv], [0],
   [Table: Descriptives
-,,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
-,g,,,,,Lower Bound,Upper Bound,,
+,g,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
+,,,,,,Lower Bound,Upper Bound,,
 x,10.00,3,3.67,4.62,2.67,-7.81,15.14,1.00,9.00
 ,20.00,5,.80,.45,.20,.24,1.36,.00,1.00
 ,30.00,8,.88,.64,.23,.34,1.41,.00,2.00
@@ -482,8 +482,8 @@ z,Between Groups,17.47,3,5.82,.62,.610
 ,Total,205.33,23,,,
 
 Table: Contrast Coefficients
-,g,,,
-Contrast,10.00,20.00,30.00,40.00
+Contrast,g,,,
+,10.00,20.00,30.00,40.00
 1,3,2,0,-5
 2,2,-9,7,0
 
@@ -618,8 +618,8 @@ oneway pigmentation by family
 AT_CHECK([pspp -o pspp.csv -o pspp.txt oneway-pig.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Descriptives
-,,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
-,family,,,,,Lower Bound,Upper Bound,,
+,family,N,Mean,Std. Deviation,Std. Error,95% Confidence Interval for Mean,,Minimum,Maximum
+,,,,,,Lower Bound,Upper Bound,,
 pigmentation,1.000,5,38.600,2.702,1.208,35.245,41.955,36.000,43.000
 ,2.000,5,46.000,1.732,.775,43.849,48.151,43.000,47.000
 ,3.000,5,46.400,4.336,1.939,41.016,51.784,40.000,50.000
@@ -633,8 +633,8 @@ pigmentation,Between Groups,478.950,3,159.650,12.927,.000
 ,Total,676.550,19,,,
 
 Table: Multiple Comparisons (pigmentation)
-,,,Mean Difference (I - J),Std. Error,Sig.,95% Confidence Interval,
-,(J) Family,(J) Family,,,,Lower Bound,Upper Bound
+,(J) Family,(J) Family,Mean Difference (I - J),Std. Error,Sig.,95% Confidence Interval,
+,,,,,,Lower Bound,Upper Bound
 LSD,1.000,2.000,-7.400,2.223,.004,-12.112,-2.688
 ,,3.000,-7.800,2.223,.003,-12.512,-3.088
 ,,4.000,-13.800,2.223,.000,-18.512,-9.088
@@ -703,8 +703,8 @@ libido,Between Groups,20.133,2,10.067,5.119,.025
 ,Total,43.733,14,,,
 
 Table: Multiple Comparisons (libido)
-,,,Mean Difference (I - J),Std. Error,Sig.,95% Confidence Interval,
-,(J) Family,(J) Family,,,,Lower Bound,Upper Bound
+,(J) Family,(J) Family,Mean Difference (I - J),Std. Error,Sig.,95% Confidence Interval,
+,,,,,,Lower Bound,Upper Bound
 Tukey HSD,Placebo,1 Dose,-1.000,.887,.516,-3.366,1.366
 ,,2 Doses,-2.800,.887,.021,-5.166,-.434
 ,1 Dose,Placebo,1.000,.887,.516,-1.366,3.366
@@ -764,8 +764,8 @@ score,Between Groups,54.9500,3,18.3167,7.0449,.003
 ,Total,96.5500,19,,,
 
 Table: Multiple Comparisons (score)
-,,,Mean Difference (I - J),Std. Error,Sig.,95% Confidence Interval,
-,(J) Family,(J) Family,,,,Lower Bound,Upper Bound
+,(J) Family,(J) Family,Mean Difference (I - J),Std. Error,Sig.,95% Confidence Interval,
+,,,,,,Lower Bound,Upper Bound
 Šidák,1.0000,2.0000,3.0000,1.0198,.056,-.0575,6.0575
 ,,3.0000,-.4000,1.0198,.999,-3.4575,2.6575
 ,,4.0000,3.2000,1.0198,.038,.1425,6.2575
@@ -846,8 +846,8 @@ Days of Use,Between Groups,555.275,3,185.092,6.663,.001
 ,Total,1555.375,39,,,
 
 Table: Multiple Comparisons (Days of Use)
-,,,Mean Difference (I - J),Std. Error,Sig.,95% Confidence Interval,
-,(J) Family,(J) Family,,,,Lower Bound,Upper Bound
+,(J) Family,(J) Family,Mean Difference (I - J),Std. Error,Sig.,95% Confidence Interval,
+,,,,,,Lower Bound,Upper Bound
 Scheffé,one,two,3.800,2.357,.467,-3.112,10.712
 ,,three,10.300,2.357,.001,3.388,17.212
 ,,four,6.000,2.357,.110,-.912,12.912
@@ -909,8 +909,8 @@ temperature,Between Groups,1.80,1,1.80,.13,.733
 ,Total,86.36,7,,,
 
 Table: Contrast Coefficients
-,sex,
-Contrast,.00,1.00
+Contrast,sex,
+,.00,1.00
 1,-1,1
 2,-3,3
 3,-9,9
@@ -1126,8 +1126,8 @@ relieftime,Between Groups,146.950,3,48.983,12.723,.000
 ,Total,208.550,19,,,
 
 Table: Contrast Coefficients
-,drugs,,,
-Contrast,.000,1.000,2.000,3.000
+Contrast,drugs,,,
+,.000,1.000,2.000,3.000
 1,3,-1,-1,-1
 2,0,2,-1,-1
 3,0,0,1,-1
index 1eacaacef0f0a87c46c8272c4ecb9c70b46a024c..3ac61d01f951f97e5791812a13ebd808c4515f4d 100644 (file)
@@ -46,14 +46,14 @@ roc x by a (1)
 AT_CHECK([pspp -o pspp.csv roc.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Case Summary
-,Valid N (listwise),
-a,Unweighted,Weighted
+a,Valid N (listwise),
+,Unweighted,Weighted
 Positive,5,50.000
 Negative,5,50.000
 
 Table: Area Under the Curve
-,Area,Std. Error,Asymptotic Sig.,Asymp. 99% Confidence Interval,
-Variable under test,,,,Lower Bound,Upper Bound
+Variable under test,Area,Std. Error,Asymptotic Sig.,Asymp. 99% Confidence Interval,
+,,,,Lower Bound,Upper Bound
 x,.910,.030,.000,.839,.981
 
 Table: Coordinates of the Curve
@@ -97,14 +97,14 @@ roc x y by a (1)
 AT_CHECK([pspp -o pspp.csv roc.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Case Summary
-,Valid N (listwise),
-a,Unweighted,Weighted
+a,Valid N (listwise),
+,Unweighted,Weighted
 Positive,5,50.000
 Negative,5,50.000
 
 Table: Area Under the Curve
-,Area,Std. Error,Asymptotic Sig.,Asymp. 95% Confidence Interval,
-Variable under test,,,,Lower Bound,Upper Bound
+Variable under test,Area,Std. Error,Asymptotic Sig.,Asymp. 95% Confidence Interval,
+,,,,Lower Bound,Upper Bound
 x,.910,.030,.000,.860,.960
 y,.697,.052,.001,.611,.783
 
@@ -169,14 +169,14 @@ roc x by a (1)
 AT_CHECK([pspp -o pspp.csv -o pspp.txt roc.sps])
 AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Case Summary
-,Valid N (listwise),
-a,Unweighted,Weighted
+a,Valid N (listwise),
+,Unweighted,Weighted
 Positive,14,14.000
 Negative,14,14.000
 
 Table: Area Under the Curve
-,Area,Std. Error,Asymptotic Sig.,Asymp. 95% Confidence Interval,
-Variable under test,,,,Lower Bound,Upper Bound
+Variable under test,Area,Std. Error,Asymptotic Sig.,Asymp. 95% Confidence Interval,
+,,,,Lower Bound,Upper Bound
 x,.490,.111,.927,.307,.673
 ])
 AT_CLEANUP