1 AT_BANNER([FREQUENCIES procedure])
3 AT_SETUP([FREQUENCIES string variable crash])
4 AT_DATA([frequencies.sps],
6 name (A8) value * quantity .
12 FREQUENCIES /VAR = name.
14 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
16 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
17 ,Cables ,1,100.00,100.00,100.00
22 # Tests for a bug where pspp would crash if two FREQUENCIES commands
23 # existed in a input file.
24 AT_SETUP([FREQUENCIES two runs crash])
25 AT_DATA([frequencies.sps],
26 [data list free /v1 v2.
34 frequencies v1 v2/statistics=none.
35 frequencies v1 v2/statistics=none.
37 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
39 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
40 ,.00,1,25.00,25.00,25.00
41 ,2.00,1,25.00,25.00,50.00
42 ,3.00,1,25.00,25.00,75.00
43 ,4.00,1,25.00,25.00,100.00
47 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
48 ,1.00,1,25.00,25.00,25.00
49 ,3.00,1,25.00,25.00,50.00
50 ,4.00,1,25.00,25.00,75.00
51 ,5.00,1,25.00,25.00,100.00
55 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
56 ,.00,1,25.00,25.00,25.00
57 ,2.00,1,25.00,25.00,50.00
58 ,3.00,1,25.00,25.00,75.00
59 ,4.00,1,25.00,25.00,100.00
63 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
64 ,1.00,1,25.00,25.00,25.00
65 ,3.00,1,25.00,25.00,50.00
66 ,4.00,1,25.00,25.00,75.00
67 ,5.00,1,25.00,25.00,100.00
72 # Tests for a bug where PSPP would crash when a FREQUENCIES command
73 # was used with the HTML output driver..
74 AT_SETUP([FREQUENCIES HTML output crash])
75 AT_DATA([frequencies.sps],
76 [data list free /v1 v2.
86 frequencies v1/statistics=none.
88 AT_CHECK([pspp -o - -O format=csv -o pspp.html frequencies.sps], [0],
97 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
98 ,.00,1,25.00,25.00,25.00
99 ,2.00,1,25.00,25.00,50.00
100 ,3.00,1,25.00,25.00,75.00
101 ,4.00,1,25.00,25.00,100.00
102 Total,,4,100.0,100.0,
104 AT_CHECK([test -s pspp.html])
107 # Tests for a bug which crashed PSPP when a piechart with too many
108 # segments was requested..
109 AT_SETUP([FREQUENCIES pie chart crash])
110 AT_DATA([frequencies.sps],
111 [data list list /x * w *.
128 frequencies /x /format=notable /statistics=none
131 # Cannot use the CSV driver for this because it does not output charts
133 AT_CHECK([pspp frequencies.sps], [0],
136 Reading free-form data from INLINE.
152 # Tests for a bug which caused FREQUENCIES following TEMPORARY to
153 # crash (bug #11492)..
154 AT_SETUP([FREQUENCIES crash after TEMPORARY])
155 AT_DATA([frequencies.sps],
156 [DATA LIST LIST /SEX (A1) X *.
175 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
176 [Table: Reading free-form data from INLINE.
182 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
183 ,12.00,1,25.00,25.00,25.00
184 ,13.00,1,25.00,25.00,50.00
185 ,21.00,1,25.00,25.00,75.00
186 ,31.00,1,25.00,25.00,100.00
187 Total,,4,100.0,100.0,
199 m4_define([FREQUENCIES_NTILES_OUTPUT],
215 AT_SETUP([FREQUENCIES basic percentiles])
216 AT_DATA([frequencies.sps],
217 [DATA LIST LIST notable /x * .
229 /PERCENTILES = 0 25 33.333 50 66.666 75 100.
231 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
232 [FREQUENCIES_NTILES_OUTPUT])
235 AT_SETUP([FREQUENCIES basic n-tiles])
236 AT_DATA([frequencies.sps],
237 [DATA LIST LIST notable /x * .
252 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
253 [FREQUENCIES_NTILES_OUTPUT])
256 AT_SETUP([FREQUENCIES compatibility percentiles])
257 AT_DATA([frequencies.sps],
258 [DATA LIST LIST notable /X * .
269 /ALGORITHM=COMPATIBLE
270 /PERCENTILES = 0 25 50 75 100.
272 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
274 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
275 ,1.00,1,20.00,20.00,20.00
276 ,2.00,1,20.00,20.00,40.00
277 ,3.00,1,20.00,20.00,60.00
278 ,4.00,1,20.00,20.00,80.00
279 ,5.00,1,20.00,20.00,100.00
280 Total,,5,100.0,100.0,
297 AT_SETUP([FREQUENCIES enhanced percentiles])
298 AT_DATA([frequencies.sps],
299 [DATA LIST LIST notable /X * .
310 /PERCENTILES = 0 25 50 75 100.
312 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
314 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
315 ,1.00,1,20.00,20.00,20.00
316 ,2.00,1,20.00,20.00,40.00
317 ,3.00,1,20.00,20.00,60.00
318 ,4.00,1,20.00,20.00,80.00
319 ,5.00,1,20.00,20.00,100.00
320 Total,,5,100.0,100.0,
337 AT_SETUP([FREQUENCIES enhanced percentiles, weighted])
338 AT_DATA([frequencies.sps],
339 [DATA LIST LIST notable /X * F *.
354 /PERCENTILES = 0 25 50 75 100.
356 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
358 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
359 ,1.00,2.00,20.00,20.00,20.00
360 ,2.00,2.00,20.00,20.00,40.00
361 ,3.00,2.00,20.00,20.00,60.00
362 ,4.00,2.00,20.00,20.00,80.00
363 ,5.00,2.00,20.00,20.00,100.00
364 Total,,10.00,100.0,100.0,
381 AT_SETUP([FREQUENCIES enhanced percentiles, weighted (2)])
382 AT_DATA([frequencies.sps],
383 [DATA LIST LIST notable /X * F *.
396 /PERCENTILES = 0 25 50 75 100.
398 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
400 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
401 ,1.00,1.00,16.67,16.67,16.67
402 ,3.00,2.00,33.33,33.33,50.00
403 ,4.00,1.00,16.67,16.67,66.67
404 ,5.00,2.00,33.33,33.33,100.00
405 Total,,6.00,100.0,100.0,
422 AT_SETUP([FREQUENCIES enhanced percentiles, weighted, missing values])
423 AT_DATA([frequencies.sps],
424 [DATA LIST LIST notable /X * F *.
434 MISSING VALUE x (99.0) .
439 /PERCENTILES = 0 25 50 75 100.
441 AT_CHECK([pspp -O format=csv frequencies.sps], [0],
443 Value Label,Value,Frequency,Percent,Valid Percent,Cum Percent
444 ,1.00,1.00,10.00,16.67,16.67
445 ,3.00,2.00,20.00,33.33,50.00
446 ,4.00,1.00,10.00,16.67,66.67
447 ,5.00,2.00,20.00,33.33,100.00
448 ,99.00,4.00,40.00,Missing,
449 Total,,10.00,100.0,100.0,