Documente Academic
Documente Profesional
Documente Cultură
Statistics
Note
Before using this information and the product it supports, read the information in Notices on page 67.
Product Information
This edition applies to version 22, release 0, modification 0 of IBM SPSS Statistics and to all subsequent releases and
modifications until otherwise indicated in new editions.
Contents
Chapter 1. Using the R Integration
Package for IBM SPSS Statistics . . . . 1
Working with R Program Blocks . . . . . . . . 1
R Syntax Rules . . . . . . . . . . . . 3
Retrieving Variable Dictionary Information . . . . 4
Reading Case Data from IBM SPSS Statistics. . . . 5
Writing Results to a New IBM SPSS Statistics Dataset 9
Creating Pivot Table Output . . . . . . . . . 10
Displaying Graphical Output from R . . . . . . 12
Retrieving Output from Syntax Commands. . . . 13
Localizing Output from R . . . . . . . . . 15
Modifying the R code . . . . . . . . . . 16
Extracting translatable text . . . . . . . . 16
Translating the pot file. . . . . . . . . . 17
Installing the mo files . . . . . . . . . . 17
Chapter 2. R Integration Package for
IBM SPSS Statistics: Functions and
Classes . . . . . . . . . . . . . . 19
BasePivotTable Class . . . . . . . . . . . 20
General Approach to Creating Pivot Tables . . . 21
BasePivotTable Methods . . . . . . . . . 25
CellText Objects . . . . . . . . . . . . 32
Creating a Warnings Table . . . . . . . . 35
GetSPSSPlugInVersion Function . . . . . . . 36
GetSPSSVersion Function . . . . . . . . . . 36
spssdata Functions . . . . . . . . . . . . 36
spssdata.CloseDataConnection Function . . . . 36
spssdata.GetCaseCount Function . . . . . . 37
spssdata.GetDataFromSPSS Function . . . . . 37
spssdata.GetDataSetList Function . . . . . . 38
spssdata.GetFileHandles Function . . . . . . 39
spssdata.GetOpenedDataSetList Function . . . 39
spssdata.GetSplitDataFromSPSS Function . . . 39
spssdata.GetSplitVariableNames Function . . . 40
spssdata.IsLastSplit Function . . . . . . . 40
spssdata.SetDataToSPSS Function . . . . . . 40
spssdictionary Functions . . . . . . . . . . 41
spssdictionary.CloseDataset Function . . . . . 41
spssdictionary.CreateSPSSDictionary Function . . 41
spssdictionary.EditCategoricalDictionary Function 43
spssdictionary.EndDataStep Function . . . . . 43
spssdictionary.GetCategoricalDictionaryFromSPSS
Function . . . . . . . . . . . . . . 44
spssdictionary.GetDataFileAttributeNames
Function . . . . . . . . . . . . . . 44
spssdictionary.GetDataFileAttributes Function . . 44
spssdictionary.GetDictionaryFromSPSS Function 44
spssdictionary.GetMultiResponseSetNames
Function . . . . . . . . . . . . . . 45
spssdictionary.GetMultiResponseSet Function . . 46
spssdictionary.GetUserMissingValues Function. . 46
spssdictionary.GetValueLabels Function . . . . 47
spssdictionary.GetVariableAttributeNames
Function . . . . . . . . . . . . . . 47
spssdictionary.GetVariableAttributes Function . . 47
spssdictionary.GetVariableCount Function . . . 48
spssdictionary.GetVariableFormat Function . . . 48
spssdictionary.GetVariableFormatType Function 48
spssdictionary.GetVariableLabel Function . . . 49
spssdictionary.GetVariableMeasurementLevel
Function . . . . . . . . . . . . . . 49
spssdictionary.GetVariableName Function . . . 49
spssdictionary.GetVariableType Function. . . . 49
spssdictionary.GetWeightVariable Function . . . 49
spssdictionary.IsWeighting Function . . . . . 49
spssdictionary.SetActive Function . . . . . . 50
spssdictionary.SetDataFileAttributes Function . . 50
spssdictionary.SetDictionaryToSPSS Function . . 50
spssdictionary.SetMultiResponseSet Function . . 51
spssdictionary.SetUserMissing Function . . . . 51
spssdictionary.SetValueLabel Function . . . . 52
spssdictionary.SetVariableAttributes Function . . 53
spsspivottable.Display Function . . . . . . . 53
spsspkg.EndProcedure Function . . . . . . . 56
spsspkg.GetOutputLanguage Function . . . . . 56
spsspkg.GetSPSSLocale Function . . . . . . . 56
spsspkg.GetSPSSPlugInVersion Function. . . . . 56
spsspkg.GetSPSSVersion Function . . . . . . . 56
spsspkg.GetStatisticsPath Function. . . . . . . 56
spsspkg.processcmd Function . . . . . . . . 56
spsspkg.SetOutput Function . . . . . . . . . 57
spsspkg.SetOutputLanguage Function . . . . . 57
spsspkg.StartProcedure Function . . . . . . . 57
spsspkg.Syntax Function . . . . . . . . . . 58
spsspkg.Template Function . . . . . . . . . 59
spsspkg.Version Function. . . . . . . . . . 60
spssRGraphics Functions . . . . . . . . . . 60
spssRGraphics.Submit Function. . . . . . . 60
spssRGraphics.SetOutput Function . . . . . 60
spssRGraphics.SetGraphicsLabel Function . . . 60
spssxmlworkspace Functions . . . . . . . . 60
spssxmlworkspace.CreateXPathDictionary
Function . . . . . . . . . . . . . . 61
spssxmlworkspace.DeleteXmlWorkspaceObject
Function . . . . . . . . . . . . . . 61
spssxmlworkspace.EvaluateXPath Function . . . 61
spssxmlworkspace.GetHandleList Function . . . 61
TextBlock Class . . . . . . . . . . . . . 62
append Method . . . . . . . . . . . . 62
Chapter 3. R Extension Commands for
SPSS Statistics . . . . . . . . . . . 65
Notices . . . . . . . . . . . . . . 67
Trademarks . . . . . . . . . . . . . . 68
Index . . . . . . . . . . . . . . . 71
iii
iv R Integration Package for IBM SPSS Statistics
Chapter 1. Using the R Integration Package for IBM SPSS
Statistics
The R Integration Package for IBM
SPSS
Printed in USA