output: Introduce pivot tables.
[pspp] / tests / language / stats / means.at
index aa59242d5c3a5b50c7e9203ae1020c88a71fbfe6..93ef68ac70ce63d159bb65275502c87383792ac8 100644 (file)
@@ -17,6 +17,7 @@ dnl
 AT_BANNER([MEANS procedure])
 
 AT_SETUP([MEANS simple example])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([means-simple.sps], [dnl
 SET FORMAT=F12.5.
@@ -60,8 +61,8 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-score: factor,26,100%,0,0%,26,100%
-score: ,26,100%,0,0%,26,100%
+score: factor,26,100.0%,0,.0%,26,100.0%
+score: ,26,100.0%,0,.0%,26,100.0%
 
 Table: Report
 ,factor,Mean,N,Std. Deviation
@@ -78,6 +79,7 @@ AT_CLEANUP
 
 
 AT_SETUP([MEANS very simple example])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([means-vsimple.sps], [dnl
 SET FORMAT=F12.5.
@@ -99,7 +101,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-score: ,4,100%,0,0%,4,100%
+score: ,4,100.0%,0,.0%,4,100.0%
 
 Table: Report
 ,Mean,N,Std. Deviation
@@ -112,6 +114,7 @@ AT_CLEANUP
 
 
 AT_SETUP([MEANS default missing])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([means-dmiss.sps], [dnl
 SET FORMAT=F12.2.
@@ -140,16 +143,16 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-a: g1 * g2,6,75%,2,25%,8,100%
-a: g2,6,75%,2,25%,8,100%
-a: ,7,87.5%,1,12.5%,8,100%
+a: g1 × g2,6,75.0%,2,25.0%,8,100.0%
+a: g2,6,75.0%,2,25.0%,8,100.0%
+a: ,7,87.5%,1,12.5%,8,100.0%
 
 Table: Report
 ,g1,g2,Mean,N
 a,1.00,11.00,4.00,1.00
-,1.00,21.00,3.00,1.00
-,2.00,21.00,6.00,1.00
-,2.00,31.00,5.67,3.00
+,,21.00,3.00,1.00
+,2.00,,6.00,1.00
+,,31.00,5.67,3.00
 
 Table: Report
 ,g2,Mean,N
@@ -166,6 +169,7 @@ AT_CLEANUP
 
 
 AT_SETUP([MEANS linear stats])
+AT_KEYWORDS([categorical categoricals])
 
 dnl Slightly more involved example to test the linear statistics
 AT_DATA([means-linear.sps], [dnl
@@ -198,8 +202,8 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-test1: group,10,100%,0,0%,10,100%
-test1: ,10,100%,0,0%,10,100%
+test1: group,10,100.0%,0,.0%,10,100.0%
+test1: ,10,100.0%,0,.0%,10,100.0%
 
 Table: Report
 ,group,Mean,N,Std. Deviation,Sum,Min,Max,Range,Variance,Kurtosis,Skewness
@@ -215,6 +219,7 @@ AT_CLEANUP
 
 
 AT_SETUP([MEANS standard errors])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([means-stderr.sps], [dnl
 set format F12.4.
@@ -243,8 +248,8 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-test1: group,10,100%,0,0%,10,100%
-test1: ,10,100%,0,0%,10,100%
+test1: group,10,100.0%,0,.0%,10,100.0%
+test1: ,10,100.0%,0,.0%,10,100.0%
 
 Table: Report
 ,group,Mean,N,S.E. Mean,S.E. Skew,S.E. Kurt
@@ -261,6 +266,7 @@ AT_CLEANUP
 
 
 AT_SETUP([MEANS harmonic and geometric means])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([means-hg.sps], [dnl
 set format F12.4.
@@ -286,8 +292,8 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-x: ,5,100%,0,0%,5,100%
-y: ,5,100%,0,0%,5,100%
+x: ,5,100.0%,0,.0%,5,100.0%
+y: ,5,100.0%,0,.0%,5,100.0%
 
 Table: Report
 ,Mean,Harmonic Mean,Geom. Mean
@@ -303,6 +309,7 @@ AT_CLEANUP
 
 
 AT_SETUP([MEANS all/none/default])
+AT_KEYWORDS([categorical categoricals])
 
 dnl Make sure that /CELLS = {ALL,NONE,DEFAULT} work properly
 AT_DATA([means-stat-keywords.sps], [dnl
@@ -330,7 +337,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-score: ,5,100%,0,0%,5,100%
+score: ,5,100.0%,0,.0%,5,100.0%
 
 Table: Report
 ,Mean,N,Std. Deviation,S.E. Mean,Sum,Min,Max,Range,Variance,Kurtosis,S.E. Kurt,Skewness,S.E. Skew,First,Last,Harmonic Mean,Geom. Mean
@@ -340,7 +347,7 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-score: ,5,100%,0,0%,5,100%
+score: ,5,100.0%,0,.0%,5,100.0%
 
 Table: Report
 ,Mean,N,Std. Deviation
@@ -350,11 +357,9 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-score: ,5,100%,0,0%,5,100%
+score: ,5,100.0%,0,.0%,5,100.0%
 
 Table: Report
-
-score
 ])
 
 AT_CLEANUP
@@ -363,6 +368,7 @@ AT_CLEANUP
 
 
 AT_SETUP([MEANS missing=table ])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([means-miss-table.sps], [dnl
 data list notable list /a * b * g1.
@@ -389,16 +395,16 @@ MEANS a b BY g1
 ])
 
 
-AT_CHECK([pspp -O format=csv means-miss-table.sps], [0],
-  [dnl
+AT_CHECK([pspp -o pspp.csv -o pspp.txt means-miss-table.sps])
+AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-a: g1,7,100%,0,0%,7,100%
-a: ,7,100%,0,0%,7,100%
-b: g1,6,85.7143%,1,14.2857%,7,100%
-b: ,6,85.7143%,1,14.2857%,7,100%
+a: g1,7,100.0%,0,.0%,7,100.0%
+a: ,7,100.0%,0,.0%,7,100.0%
+b: g1,6,85.7%,1,14.3%,7,100.0%
+b: ,6,85.7%,1,14.3%,7,100.0%
 
 Table: Report
 ,g1,N
@@ -416,8 +422,8 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-a: g1,7,100%,0,0%,7,100%
-a: ,7,100%,0,0%,7,100%
+a: g1,7,100.0%,0,.0%,7,100.0%
+a: ,7,100.0%,0,.0%,7,100.0%
 
 Table: Report
 ,g1,N
@@ -432,10 +438,10 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-a: g1,7,100%,0,0%,7,100%
-a: ,7,100%,0,0%,7,100%
-b: g1,6,85.7143%,1,14.2857%,7,100%
-b: ,6,85.7143%,1,14.2857%,7,100%
+a: g1,7,100.0%,0,.0%,7,100.0%
+a: ,7,100.0%,0,.0%,7,100.0%
+b: g1,6,85.7%,1,14.3%,7,100.0%
+b: ,6,85.7%,1,14.3%,7,100.0%
 
 Table: Report
 ,g1,N
@@ -453,8 +459,8 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-a: g1,7,100%,0,0%,7,100%
-a: ,7,100%,0,0%,7,100%
+a: g1,7,100.0%,0,.0%,7,100.0%
+a: ,7,100.0%,0,.0%,7,100.0%
 
 Table: Report
 ,g1,N
@@ -465,14 +471,10 @@ Table: Report
 ,N
 a,7.00
 ])
-
 AT_CLEANUP
 
-
-
-
-
 AT_SETUP([MEANS user missing values])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([means-missing.sps], [dnl
 data list notable list /a * b * g1.
@@ -496,16 +498,16 @@ MEANS a b BY g1 /cells =  COUNT /missing = dependent .
 ])
 
 
-AT_CHECK([pspp -O format=csv means-missing.sps], [0],
-  [dnl
+AT_CHECK([pspp -o pspp.csv -o pspp.txt means-missing.sps])
+AT_CHECK([cat pspp.csv], [0], [dnl
 Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-a: g1,6,85.7143%,1,14.2857%,7,100%
-a: ,7,100%,0,0%,7,100%
-b: g1,5,71.4286%,2,28.5714%,7,100%
-b: ,6,85.7143%,1,14.2857%,7,100%
+a: g1,6,85.7%,1,14.3%,7,100.0%
+a: ,7,100.0%,0,.0%,7,100.0%
+b: g1,5,71.4%,2,28.6%,7,100.0%
+b: ,6,85.7%,1,14.3%,7,100.0%
 
 Table: Report
 ,g1,N
@@ -523,10 +525,10 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-a: g1,7,100%,0,0%,7,100%
-a: ,7,100%,0,0%,7,100%
-b: g1,7,100%,0,0%,7,100%
-b: ,7,100%,0,0%,7,100%
+a: g1,7,100.0%,0,.0%,7,100.0%
+a: ,7,100.0%,0,.0%,7,100.0%
+b: g1,7,100.0%,0,.0%,7,100.0%
+b: ,7,100.0%,0,.0%,7,100.0%
 
 Table: Report
 ,g1,N
@@ -546,10 +548,10 @@ Table: Case Processing Summary
 ,Cases,,,,,
 ,Included,,Excluded,,Total,
 ,N,Percent,N,Percent,N,Percent
-a: g1,7,100%,0,0%,7,100%
-a: ,7,100%,0,0%,7,100%
-b: g1,6,85.7143%,1,14.2857%,7,100%
-b: ,6,85.7143%,1,14.2857%,7,100%
+a: g1,7,100.0%,0,.0%,7,100.0%
+a: ,7,100.0%,0,.0%,7,100.0%
+b: g1,6,85.7%,1,14.3%,7,100.0%
+b: ,6,85.7%,1,14.3%,7,100.0%
 
 Table: Report
 ,g1,N
@@ -565,12 +567,12 @@ Table: Report
 a,7.00
 b,6.00
 ])
-
 AT_CLEANUP
 
 
 
 AT_SETUP([MEANS empty factor spec])
+AT_KEYWORDS([categorical categoricals])
 
 AT_DATA([means-bad.sps], [dnl
 data list list /outcome *.
@@ -591,6 +593,7 @@ AT_CLEANUP
 
 
 AT_SETUP([MEANS parser bug])
+AT_KEYWORDS([categorical categoricals])
 
 dnl This bug caused an infinite loop
 AT_DATA([means-bad.sps], [dnl