OMS exporting table headers to variable names

classic Classic list List threaded Threaded
2 messages Options
raw
Reply | Threaded
Open this post in threaded view
|

OMS exporting table headers to variable names

raw
dear all I am using oms to export some results about different trimesters. (the trim variable)



* OMS.
DATASET DECLARE  MY_OUT.
OMS
 /SELECT TABLES
  /IF COMMANDS=['CTables'] SUBTYPES=['Custom Table']
  /DESTINATION FORMAT=SAV NUMBERED=TableNumber_
   OUTFILE='KPI_1'.

* Custom Tables.
CTABLES
  /VLABELS VARIABLES=KPI_1 trim DISPLAY=LABEL
  /TABLE KPI_1 [COLPCT.COUNT PCT40.0] BY trim
  /CATEGORIES VARIABLES=KPI_1  EMPTY=INCLUDE
  /CATEGORIES VARIABLES=trim ORDER=A KEY=VALUE EMPTY=exclude.
omsend.


In the dataset MY_OUT, containing table results, I can see generic columns such as ColumnN
ColumnN_A
ColumnN_B
ColumnN_C, etc.: each column is a trimester.

While in the variable labels I can see the trimester names, such as "trim 4T_2014 Column N %",
"trim 1T_2015 Column N %", etc.

Is there a way to put directly with OMS more specific names to the variables, such as trim 4T_2014 instead of ColumnN? (of course I could do a rename variables, but if there is a specific function it's more efficient)

Reply | Threaded
Open this post in threaded view
|

Re: OMS exporting table headers to variable names

Jon Peck
The dataset format uses generic names.  Labels would not generally be valid as variable names.  You could post process using cleaned up labels with some Python code, but OMS won't do that for you.

On Wednesday, March 23, 2016, raw <[hidden email]> wrote:
dear all I am using oms to export some results about different trimesters.
(the trim variable)



* OMS.
DATASET DECLARE  MY_OUT.
OMS
 /SELECT TABLES
  /IF COMMANDS=['CTables'] SUBTYPES=['Custom Table']
  /DESTINATION FORMAT=SAV NUMBERED=TableNumber_
   OUTFILE='KPI_1'.

* Custom Tables.
CTABLES
  /VLABELS VARIABLES=KPI_1 trim DISPLAY=LABEL
  /TABLE KPI_1 [COLPCT.COUNT PCT40.0] BY trim
  /CATEGORIES VARIABLES=KPI_1  EMPTY=INCLUDE
  /CATEGORIES VARIABLES=trim ORDER=A KEY=VALUE EMPTY=exclude.
omsend.


In the dataset MY_OUT, containing table results, I can see generic columns
such as ColumnN
ColumnN_A
ColumnN_B
ColumnN_C, etc.: each column is a trimester.

While in the variable labels I can see the trimester names, such as "trim
4T_2014 Column N %",
"trim 1T_2015 Column N %", etc.

Is there a way to put directly with OMS more specific names to the
variables, such as trim 4T_2014 instead of ColumnN? (of course I could do a
rename variables, but if there is a specific function it's more efficient)





--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/OMS-exporting-table-headers-to-variable-names-tp5731800.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;LISTSERV@LISTSERV.UGA.EDU&#39;)">LISTSERV@... (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


--
Jon K Peck
[hidden email]


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD