I have these commands to run a MEANS table.
I am wondering if there is away after I create the means to give the OMS Subtitle a more meaningful name than "Report"? Something like "Q6a Means"?
I am running a series of these so would to change this before the next run takes place
TIA,
Lance
OMS
/SELECT ALL
/DESTINATION VIEWER = NO.
OMS
/SELECT TABLES
/IF COMMANDS=['Means'] SUBTYPES=['Report']
/DESTINATION VIEWER=YES.
begin program.
import spss, spssaux, spssdata
vd=spssaux.VariableDict(pattern="Q6a_LOOP_")
firstBrandVar=vd[0]
lastBrandVar = sorted(vd, key=lambda v: v.VariableIndex)[-1];
cmdset= r"""RECODE %(firstBrandVar)s to %(lastBrandVar)s (5=1) (4=2) (3=3) (2=4) (1=5) (6=sysmis).
MEANS %(firstBrandVar)s to %(lastBrandVar)s ."""
spss.Submit(cmdset % locals())
end program.
OMSEND.
OMSEND.
Answer by JonPeck (4671) | Sep 14, 2015 at 08:45 PM
The default title is indeed dumb. What you need to change is not the OMS Subtype but the table title. You can do this with the OUTPUT MODIFY command. For example,
OUTPUT MODIFY NAME=Document1
/SELECT TABLES
/IF COMMANDS=["Means(1)"] LABELS=[EXACT("Report")] INSTANCES=[1]
/TABLE TABLETITLE='my title' /OBJECTPROPERTIES OUTLINELABEL='my title'.
You can also do this with the SPSSINC MODIFY TABLES extension command, which also lets you change the entry in the outline.
When I run PSM I get a separate file but it only contains cases with no matches. 3 Answers
Fuzzy match tolerance 4 Answers
spss.Submit and unicode strings 1 Answer
spssaux.GetValuesFromXMLWorkspace 2 Answers
Fuzzy newer stops 1 Answer