Append Method (R)
.Append(object,place,dimName,hideName,hideLabels). Appends
row, column, and layer dimensions to a pivot table. You use this
method, or the Insert method, to create the dimensions associated
with a custom pivot table. The argument object is a reference
to the associated BasePivotTable object. The argument place specifies
the type of dimension: Dimension.Place.row for a
row dimension, Dimension.Place.column for a column
dimension, and Dimension.Place.layer for a layer
dimension. The argument dimName is a string that specifies
the name used to label this dimension in the displayed table. Each
dimension must have a unique name. The argument hideName specifies
whether the dimension name is hidden--by default, it is displayed.
Use hideName=TRUE to hide the name. The argument hideLabels specifies
whether category labels for this dimension are hidden--by default,
they are displayed. Use hideLabels=TRUE to hide category
labels.
- The order in which dimensions are appended affects how they are displayed in the resulting table. Each newly appended dimension of a particular type (row, column, or layer) becomes the current innermost dimension in the displayed table, as shown in the example below.
- The order in which dimensions are created (with the
AppendorInsertmethod) determines the order in which categories should be specified when providing the dimension coordinates for a particular cell (used when Setting Cell Values or adding Footnotes). For example, when specifying coordinates using an expression such as(category1,category2), category1 refers to the dimension created by the first call toAppendorInsert, and category2 refers to the dimension created by the second call toAppendorInsert.
Example
table = spss.BasePivotTable("Table Title",
"OMS table subtype")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
rowdim1=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-1")
rowdim2=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-2")

Examples of using the Append method are most easily
understood in the context of going through the steps to create a pivot
table. See the topic General Approach to Creating Pivot Tables (R) for more information.