SPSSINC CENSOR TABLES issue

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

SPSSINC CENSOR TABLES issue

boschw

Hi all,

 

I’m running a lot of Custom Tables where we are censoring any rows where the total n is < 20.  That part is fine.  The issue is that any censored values change from center justified to right justified. 

 

I’ve looked around at the other table formatting extension commands and the OUTPUT MODIFY command, but none seem to have a function that changes the text alignment.  In the Censor Tables command I tried using a “-“ right padded with the correct number of blanks as the replacement text so it would appear center justified, but that didn’t work - it just replaced the number with a right justified “-“.  I also tried using the OUTPUT MODIFY command using REPLACE, but the SELECTCONDITION keyword is not behaving at all as I’d expect, though this is the first time I’ve tried using it.

 

Relatedly, I got SELECTCONDITION to recognize my row headers (selecting them by the text of the label), but REPLACE absolutely would not change row header text.  Only data cell text.

 

Does anyone know a way to fix this or should I just live with the mix of alignments?  I’m happy to send sample data, syntax, output, etc. if anyone is able to help.  Thanks!

 

Walker Bosch | Data Analyst

Wilder Research | 451 Lexington Parkway North | Saint Paul, MN  55104

651.280.2679 (phone) | 651.280.3679 (fax) | [hidden email]

 

IMPORTANT WARNING:  This message is intended for the use of the person or entity to which it is addressed and may contain information that is privileged and confidential, the disclosure of which is governed by applicable law.  If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this information is strictly prohibited.  If you have received this message in error, please notify the sender immediately and arrange for the return or destruction of these documents.

 

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: SPSSINC CENSOR TABLES issue

Jon Peck
When I wrote CENSOR TABLES, my expectation was that the values being censored were numeric, so you would want the censoring symbol to be right-aligned.  I didn't expect numeric values to be anything but right aligned.

I can add a keyword to control the alignment if that would help.  Send me an appropriate spv file if you want to pursue this.  

It is possible to control cell alignment using SPSSINC MODIFY TABLES by adding code like this to the STYLES subcommand.
CUSTOMFUNCTION="customstylefunctions.SetAlignment(align='center')".

On Fri, Sep 2, 2016 at 11:55 AM, Walker J. Bosch <[hidden email]> wrote:

Hi all,

 

I’m running a lot of Custom Tables where we are censoring any rows where the total n is < 20.  That part is fine.  The issue is that any censored values change from center justified to right justified. 

 

I’ve looked around at the other table formatting extension commands and the OUTPUT MODIFY command, but none seem to have a function that changes the text alignment.  In the Censor Tables command I tried using a “-“ right padded with the correct number of blanks as the replacement text so it would appear center justified, but that didn’t work - it just replaced the number with a right justified “-“.  I also tried using the OUTPUT MODIFY command using REPLACE, but the SELECTCONDITION keyword is not behaving at all as I’d expect, though this is the first time I’ve tried using it.

 

Relatedly, I got SELECTCONDITION to recognize my row headers (selecting them by the text of the label), but REPLACE absolutely would not change row header text.  Only data cell text.

 

Does anyone know a way to fix this or should I just live with the mix of alignments?  I’m happy to send sample data, syntax, output, etc. if anyone is able to help.  Thanks!

 

Walker Bosch | Data Analyst

Wilder Research | 451 Lexington Parkway North | Saint Paul, MN  55104

<a href="tel:651.280.2679" value="+16512802679" target="_blank">651.280.2679 (phone) | <a href="tel:651.280.3679" value="+16512803679" target="_blank">651.280.3679 (fax) | [hidden email]

 

IMPORTANT WARNING:  This message is intended for the use of the person or entity to which it is addressed and may contain information that is privileged and confidential, the disclosure of which is governed by applicable law.  If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this information is strictly prohibited.  If you have received this message in error, please notify the sender immediately and arrange for the return or destruction of these documents.

 

===================== 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



--
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
Reply | Threaded
Open this post in threaded view
|

Re: SPSSINC CENSOR TABLES issue

boschw

Thanks, Jon.  I had another reply off-list, and between the two of you I think I’ve been convinced to right justify the cells.

 

I do have a follow-up question, though. Where can I find the custom style functions for Modify Tables?  It seems like there is a pre-existing set of functions ready for use that pop up here every so often and seem easy enough to use, but I don’t know where to find them or what ones are available.  Thank you!

 

Walker Bosch

651.280.2679

 

From: Jon Peck [mailto:[hidden email]]
Sent: Friday, September 02, 2016 1:10 PM
To: Walker J. Bosch <[hidden email]>
Cc: SPSS List <[hidden email]>
Subject: Re: [SPSSX-L] SPSSINC CENSOR TABLES issue

 

When I wrote CENSOR TABLES, my expectation was that the values being censored were numeric, so you would want the censoring symbol to be right-aligned.  I didn't expect numeric values to be anything but right aligned.

 

I can add a keyword to control the alignment if that would help.  Send me an appropriate spv file if you want to pursue this.  

 

It is possible to control cell alignment using SPSSINC MODIFY TABLES by adding code like this to the STYLES subcommand.

CUSTOMFUNCTION="customstylefunctions.SetAlignment(align='center')".

 

On Fri, Sep 2, 2016 at 11:55 AM, Walker J. Bosch <[hidden email]> wrote:

Hi all,

 

I’m running a lot of Custom Tables where we are censoring any rows where the total n is < 20.  That part is fine.  The issue is that any censored values change from center justified to right justified. 

 

I’ve looked around at the other table formatting extension commands and the OUTPUT MODIFY command, but none seem to have a function that changes the text alignment.  In the Censor Tables command I tried using a “-“ right padded with the correct number of blanks as the replacement text so it would appear center justified, but that didn’t work - it just replaced the number with a right justified “-“.  I also tried using the OUTPUT MODIFY command using REPLACE, but the SELECTCONDITION keyword is not behaving at all as I’d expect, though this is the first time I’ve tried using it.

 

Relatedly, I got SELECTCONDITION to recognize my row headers (selecting them by the text of the label), but REPLACE absolutely would not change row header text.  Only data cell text.

 

Does anyone know a way to fix this or should I just live with the mix of alignments?  I’m happy to send sample data, syntax, output, etc. if anyone is able to help.  Thanks!

 

Walker Bosch | Data Analyst

Wilder Research | 451 Lexington Parkway North | Saint Paul, MN  55104

<a href="tel:651.280.2679" target="_blank">651.280.2679 (phone) | <a href="tel:651.280.3679" target="_blank">651.280.3679 (fax) | [hidden email]

 

IMPORTANT WARNING:  This message is intended for the use of the person or entity to which it is addressed and may contain information that is privileged and confidential, the disclosure of which is governed by applicable law.  If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this information is strictly prohibited.  If you have received this message in error, please notify the sender immediately and arrange for the return or destruction of these documents.

 

===================== 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



 

--

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
Reply | Threaded
Open this post in threaded view
|

Re: SPSSINC CENSOR TABLES issue

Jon Peck
The functions in the customstyles.py module are mostly listed in the dialog help, but just with the names, and the dialog help isn't always up to date as new functions are added.  To see what's available at any given time, just open the module in any plain text editor.  The functions all have comments that can be understood without any need to understand Python.  Most of them have usage examples.  As of now there are 42 functions there.

On Fri, Sep 2, 2016 at 12:51 PM, Walker J. Bosch <[hidden email]> wrote:

Thanks, Jon.  I had another reply off-list, and between the two of you I think I’ve been convinced to right justify the cells.

 

I do have a follow-up question, though. Where can I find the custom style functions for Modify Tables?  It seems like there is a pre-existing set of functions ready for use that pop up here every so often and seem easy enough to use, but I don’t know where to find them or what ones are available.  Thank you!

 

Walker Bosch

<a href="tel:651.280.2679" value="+16512802679" target="_blank">651.280.2679

 

From: Jon Peck [mailto:[hidden email]]
Sent: Friday, September 02, 2016 1:10 PM
To: Walker J. Bosch <[hidden email]>
Cc: SPSS List <[hidden email]>
Subject: Re: [SPSSX-L] SPSSINC CENSOR TABLES issue

 

When I wrote CENSOR TABLES, my expectation was that the values being censored were numeric, so you would want the censoring symbol to be right-aligned.  I didn't expect numeric values to be anything but right aligned.

 

I can add a keyword to control the alignment if that would help.  Send me an appropriate spv file if you want to pursue this.  

 

It is possible to control cell alignment using SPSSINC MODIFY TABLES by adding code like this to the STYLES subcommand.

CUSTOMFUNCTION="customstylefunctions.SetAlignment(align='center')".

 

On Fri, Sep 2, 2016 at 11:55 AM, Walker J. Bosch <[hidden email]> wrote:

Hi all,

 

I’m running a lot of Custom Tables where we are censoring any rows where the total n is < 20.  That part is fine.  The issue is that any censored values change from center justified to right justified. 

 

I’ve looked around at the other table formatting extension commands and the OUTPUT MODIFY command, but none seem to have a function that changes the text alignment.  In the Censor Tables command I tried using a “-“ right padded with the correct number of blanks as the replacement text so it would appear center justified, but that didn’t work - it just replaced the number with a right justified “-“.  I also tried using the OUTPUT MODIFY command using REPLACE, but the SELECTCONDITION keyword is not behaving at all as I’d expect, though this is the first time I’ve tried using it.

 

Relatedly, I got SELECTCONDITION to recognize my row headers (selecting them by the text of the label), but REPLACE absolutely would not change row header text.  Only data cell text.

 

Does anyone know a way to fix this or should I just live with the mix of alignments?  I’m happy to send sample data, syntax, output, etc. if anyone is able to help.  Thanks!

 

Walker Bosch | Data Analyst

Wilder Research | 451 Lexington Parkway North | Saint Paul, MN  55104

<a href="tel:651.280.2679" target="_blank">651.280.2679 (phone) | <a href="tel:651.280.3679" target="_blank">651.280.3679 (fax) | [hidden email]

 

IMPORTANT WARNING:  This message is intended for the use of the person or entity to which it is addressed and may contain information that is privileged and confidential, the disclosure of which is governed by applicable law.  If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this information is strictly prohibited.  If you have received this message in error, please notify the sender immediately and arrange for the return or destruction of these documents.

 

===================== 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



 

--

Jon K Peck
[hidden email]




--
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