* <a name="leadzero">`LEADZERO`</a>
Controls whether numbers with magnitude less than one are displayed
with a zero before the decimal point. For example, with `SET
- LEADZERO=OFF`, which is the default, one-half is shown as 0.5, and
- with `SET LEADZERO=ON`, it is shown as .5. This setting affects
+ LEADZERO=OFF`, which is the default, one-half is shown as `0.5`, and
+ with `SET LEADZERO=ON`, it is shown as `.5`. This setting affects
only the `F`, `COMMA`, and `DOT` formats.
* <a name="mdisplay">`MDISPLAY`</a>
preferred to ordinary decimal notation without it.
- Except in scientific notation, a decimal point is included only when
- it is followed by a digit. If the integer part of the number being
- output is 0, and a decimal point is included, then PSPP ordinarily
- drops the zero before the decimal point. However, in `F`, `COMMA`,
- or `DOT` formats, PSPP keeps the zero if [`SET
- LEADZERO`](../../../commands/set.md#leadzero) is set to
- `ON`.
-
- In scientific notation, the number always includes a decimal point,
- even if it is not followed by a digit.
+ it is followed by a digit. In scientific notation, the number
+ always includes a decimal point, even if it is not followed by a
+ digit.
+
+- If the integer part of the number being output is 0, and a decimal
+ point is included, whether PSPP displays the zero before the decimal
+ point depends on the following factors:
+
+ - For `F`, `COMMA`, or `DOT` formats, PSPP keeps the leading zero if
+ [`SET LEADZERO`](../../../commands/set.md#leadzero) is set to
+ `ON`.
+
+ - For `PCT` and `DOLLAR`, PSPP drops the leading zero unless the
+ number is being output within a pivot table in PSPP output[^0].
+
+ [^0]: There is a further exception: PSPP drops the leading zero if
+ the number is being output within a pivot table as part of a
+ templated longer text string rather than as a number on its own.
+ These currently only appear in SPV files written by SPSS.
- A negative number includes a minus sign only in the presence of a
nonzero digit: -0.01 is output as `-.01` in `F4.2` format but as
Pivot Table with Alphabetic Subscript Footnotes[*]
-â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬â\94\80─────────────────╮
-│ │ A[*] │
-│ ├───────┬──────────┤
-│Corner[*][b]│ B[b] │ C[*][b] │
-â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80─────────┤
-│D[b] E[*] │ .00│ 1.00[*]│
-│ F[*][b]│2.00[b]│3.00[*][b]│
-â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80─────────╯
+â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬─────────────────╮
+│ │ A[*] │
+│ ├───────┬─────────┤
+│Corner[*,b]│ B[b] │ C[*,b] │
+â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼─────────┤
+│D[b] E[*] │ .00│ 1.00[*]│
+│ F[*,b]│2.00[b]│3.00[*,b]│
+â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´─────────╯
Caption[*]
*. First footnote
b. Second footnote
Pivot Table with Alphabetic Superscript Footnotes[*]
-â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬â\94\80─────────────────╮
-│ │ A[*] │
-│ ├───────┬──────────┤
-│Corner[*][b]│ B[b] │ C[*][b] │
-â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80─────────┤
-│D[b] E[*] │ .00│ 1.00[*]│
-│ F[*][b]│2.00[b]│3.00[*][b]│
-â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80─────────╯
+â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬─────────────────╮
+│ │ A[*] │
+│ ├───────┬─────────┤
+│Corner[*,b]│ B[b] │ C[*,b] │
+â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼─────────┤
+│D[b] E[*] │ .00│ 1.00[*]│
+│ F[*,b]│2.00[b]│3.00[*,b]│
+â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´─────────╯
Caption[*]
*. First footnote
b. Second footnote
Pivot Table with Alphabetic Subscript Footnotes[*]
-â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬â\94\80─────────────────╮
-│ │ A[*] │
-│ ├───────┬──────────┤
-│Corner[*][b]│ B[b] │ C[*][b] │
-â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80─────────┤
-│D[b] E[*] │ .00│ 1.00[*]│
-│ F[*][b]│2.00[b]│3.00[*][b]│
-â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80─────────╯
+â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬─────────────────╮
+│ │ A[*] │
+│ ├───────┬─────────┤
+│Corner[*,b]│ B[b] │ C[*,b] │
+â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼─────────┤
+│D[b] E[*] │ .00│ 1.00[*]│
+│ F[*,b]│2.00[b]│3.00[*,b]│
+â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´─────────╯
Caption[*]
b. Second footnote
Pivot Table with Numeric Subscript Footnotes[*]
-â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬â\94\80─────────────────╮
-│ │ A[*] │
-│ ├───────┬──────────┤
-│Corner[*][2]│ B[2] │ C[*][2] │
-â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80─────────┤
-│D[2] E[*] │ .00│ 1.00[*]│
-│ F[*][2]│2.00[2]│3.00[*][2]│
-â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80─────────╯
+â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬─────────────────╮
+│ │ A[*] │
+│ ├───────┬─────────┤
+│Corner[*,2]│ B[2] │ C[*,2] │
+â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼─────────┤
+│D[2] E[*] │ .00│ 1.00[*]│
+│ F[*,2]│2.00[2]│3.00[*,2]│
+â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´─────────╯
Caption[*]
*. First footnote
2. Second footnote
Pivot Table with Numeric Superscript Footnotes[*]
-â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬â\94\80─────────────────╮
-│ │ A[*] │
-│ ├───────┬──────────┤
-│Corner[*][2]│ B[2] │ C[*][2] │
-â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80─────────┤
-│D[2] E[*] │ .00│ 1.00[*]│
-│ F[*][2]│2.00[2]│3.00[*][2]│
-â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80─────────╯
+â\95â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¬─────────────────╮
+│ │ A[*] │
+│ ├───────┬─────────┤
+│Corner[*,2]│ B[2] │ C[*,2] │
+â\94\9câ\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94¼─────────┤
+│D[2] E[*] │ .00│ 1.00[*]│
+│ F[*,2]│2.00[2]│3.00[*,2]│
+â\95°â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94\80â\94´─────────╯
Caption[*]
*. First footnote
2. Second footnote
variable::{VarType, Variable},
};
use chrono::{NaiveDateTime, NaiveTime};
+use itertools::Itertools;
use serde::{
Serialize, Serializer,
ser::{SerializeMap, SerializeStruct},
write!(f, "{delimiter}{subscript}")?;
}
- for footnote in self.footnotes {
- write!(f, "[{}]", footnote.display_marker(&self.options))?;
+ if !self.footnotes.is_empty() {
+ write!(
+ f,
+ "[{}]",
+ self.footnotes
+ .iter()
+ .map(|f| f.display_marker(&self.options))
+ .format(",")
+ )?;
}
Ok(())
│ Refused AGE│59.0[1]│. │50.0[1]│. │54.5│ 6.4│
│ Total AGE│ 52.1│ 9.1│ 51.8│ 10.7│51.9│ 10.0│
╰────────────────────────┴───────┴──────────────────┴───────┴──────────────────┴────┴──────────────────╯
-Note: Values in the same row and subtable not sharing the same subscript are significantly different at p< 0.05 in the two-sided test of equality for column means. Cells with no subscript are not included in the test. Tests assume equal variances.[2][3]
+Note: Values in the same row and subtable not sharing the same subscript are significantly different at p< 0.05 in the two-sided test of equality for column means. Cells with no subscript are not included in the test. Tests assume equal variances.[2,3]
1. This category is not used in comparisons because the sum of case weights is less than two.
2. Tests are adjusted for all pairwise comparisons within a row of each innermost subtable using the Bonferroni correction.
3. Pairwise comparisons are not performed for some subtables because of numerical problems.
Analysis
-Test: Duncan[a][b]
+Test: Duncan[a,b]
│ Subset
SP36 N│ 1
───────┼───────