Creating a Warnings Table (R)
You can create an IBM® SPSS® Statistics Warnings
table using the spss.BasePivotTable
function by specifying "Warnings"
for
the templateName argument. Note that an IBM SPSS Statistics Warnings
table has a very specific structure, so unless you actually want a
Warnings table you should avoid using "Warnings"
for templateName.
Example
BEGIN PROGRAM R.
spsspkg.StartProcedure("demo")
msg=spss.CellText.String("First line of Warnings table content
Second line of Warnings table content")
table=spss.BasePivotTable("Warnings ","Warnings")
rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim",
hideName=TRUE,hideLabels=TRUE)
cat=spss.CellText.String("1")
BasePivotTable.SetCategories(table,rowdim,cat)
BasePivotTable.SetCellValue(table,cat,msg)
spsspkg.EndProcedure()
END PROGRAM.
- The title argument to the
spss.BasePivotTable
function is set to the string "Warnings ", It can be set to an arbitrary value but it cannot be identical to the templateName value, hence the space at the end of the string. - The templateName argument must be set to the string "Warnings", independent of the IBM SPSS Statistics output language.
- A Warnings table has a single row dimension with all labels hidden and can consist of one or more rows. In this example, the table has a single multi-line row.
Result
