|
Im running version 14 with all fixes
Im using SAX basic script to modify pivot table titles by adding a table number I want to FORCE a line feed after the table number so the rest of the table title in on the next line - in there a key combination I can specify in my script to do this? Thanks! Tim **************************** Notice: This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions. ===================== 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 |
|
Try: \n
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Tim Hennigar Sent: Monday, December 10, 2007 10:33 AM To: [hidden email] Subject: Line Feed Character Im running version 14 with all fixes Im using SAX basic script to modify pivot table titles by adding a table number I want to FORCE a line feed after the table number so the rest of the table title in on the next line - in there a key combination I can specify in my script to do this? Thanks! Tim **************************** Notice: This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions. ===================== 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 ===================== 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 |
|
NO - all the documentation says use '\n' in variable and value assignment to
force line feeds - nothing about 'titles' - and if fact I tried many variations and it does not do anything - course - that doesnt mean I found the correct variation However, in the course of that I discovered that the line feed character they are using is "¬" - and I can insert this is the title - and it WILL work BUT for it to take effect - I have to manually activate the table title and exit from it - I still have NOT found out how to do this via the script. Thanks! Tim **************************** Notice: This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions. -----Original Message----- From: Oliver, Richard [mailto:[hidden email]] Sent: December 10, 2007 11:55 AM To: [hidden email]; [hidden email] Subject: RE: Line Feed Character Try: \n -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Tim Hennigar Sent: Monday, December 10, 2007 10:33 AM To: [hidden email] Subject: Line Feed Character Im running version 14 with all fixes Im using SAX basic script to modify pivot table titles by adding a table number I want to FORCE a line feed after the table number so the rest of the table title in on the next line - in there a key combination I can specify in my script to do this? Thanks! Tim **************************** Notice: This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions. ===================== 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 ===================== 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 |
|
In reply to this post by Oliver, Richard
Here is snippet of the script
>>>> is where I added the line But I need the script to force an 'update' of the table title I tried selecting the title, update screen methods - neither worked the latter crashed 'collect and label and change table titles and write to file Set objSpssOut1 = objSpssOut.Items ItmIndx = objSpssOut1.Count For GenIndx = 0 To (ItmIndx - 1) Step 1 Set objSpssOut2 = objSpssOut1.GetItem(GenIndx) ItmType = objSpssOut2.SPSSType If ((ItmType = 5) And (objSpssOut2.Visible)) Then objSpssOut2.Selected=True Print #1, "Table ";tblcntr;": ";objSpssOut2.Label sNewLabel = "Table " & tblcntr & ": " & objSpssOut2.Label objSpssOut2.Label = sNewLabel Set objPivotTable = objSpssOut2.ActivateTable objPivotTable.UpdateScreen = False 'sNewLabel = "Table " & tblcntr & ": " & objPivotTable.TitleText >>>> sNewLabel = "Table " & tblcntr & "¬" & objPivotTable.TitleText objPivotTable.TitleText = sNewLabel objSpssOut2.Deactivate objSpssOut2.Selected=False tblcntr = tblcntr + 1 End If Next GenIndx Thanks! Tim **************************** Notice: This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions. -----Original Message----- From: Oliver, Richard [mailto:[hidden email]] Sent: December 10, 2007 11:55 AM To: [hidden email]; [hidden email] Subject: RE: Line Feed Character Try: \n -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Tim Hennigar Sent: Monday, December 10, 2007 10:33 AM To: [hidden email] Subject: Line Feed Character Im running version 14 with all fixes Im using SAX basic script to modify pivot table titles by adding a table number I want to FORCE a line feed after the table number so the rest of the table title in on the next line - in there a key combination I can specify in my script to do this? Thanks! Tim **************************** Notice: This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions. ===================== 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 ===================== 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 |
|
Hi Tim
look at the code below. I think that is it what you need. Christian ******************************* la volta statistics Christian Schmidhauser, Dr.phil.II Weinbergstrasse 108 Ch-8006 Zürich Tel: +41 (043) 233 98 01 Fax: +41 (043) 233 98 02 email: mailto:[hidden email] internet: http://www.lavolta.ch/ * Code to make three Tables. New File. * Dummy data for illustration purposes. DATA LIST LIST /a. BEGIN DATA 1 2 4 2 4 END DATA. COMPUTE wgt=1. Exec. TABLES /FORMAT BLANK MISSING('.') /TABLES a BY (STATISTICS) /STATISTICS count( ( F5.0 )) /Title = "Some text". TABLES /FORMAT BLANK MISSING('.') /TABLES a BY (STATISTICS) /STATISTICS count( ( F5.0 )) /Title = "Some text". TABLES /FORMAT BLANK MISSING('.') /TABLES a BY (STATISTICS) /STATISTICS count( ( F5.0 )) /Title = "Some text". ***************************. * Script to number titles. ***************************. Option Explicit Sub Main Dim objOutputDoc As ISpssOutputDoc Dim objSpssOut1 As ISpssItems Dim objSpssOut2 As ISpssItem Dim objPivotTable As PivotTable Dim ItmIndx As Integer Dim GenIndx As Integer Dim ItmType As Integer Dim tblcntr As Integer Dim sNewLabel As String Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc Set objSpssOut1 = objOutputDoc.Items() ItmIndx = objSpssOut1.Count For GenIndx = 0 To (ItmIndx - 1) Step 1 Set objSpssOut2 = objSpssOut1.GetItem(GenIndx) ItmType = objSpssOut2.SPSSType If ((ItmType = 5) And (objSpssOut2.Visible)) Then Set objPivotTable= objSpssOut2.ActivateTable sNewLabel = "Table " & tblcntr & ": " & vbCrLf & objSpssOut2.Label ' Debug.Print sNewLabel objPivotTable.TitleText = sNewLabel objSpssOut2.Deactivate tblcntr = tblcntr + 1 End If Next GenIndx End Sub -----Ursprüngliche Nachricht----- Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von Tim Hennigar Gesendet: Montag, 10. Dezember 2007 18:41 An: [hidden email] Betreff: Re: Line Feed Character follow up Here is snippet of the script >>>> is where I added the line But I need the script to force an 'update' of the table title I tried selecting the title, update screen methods - neither worked the latter crashed 'collect and label and change table titles and write to file Set objSpssOut1 = objSpssOut.Items ItmIndx = objSpssOut1.Count For GenIndx = 0 To (ItmIndx - 1) Step 1 Set objSpssOut2 = objSpssOut1.GetItem(GenIndx) ItmType = objSpssOut2.SPSSType If ((ItmType = 5) And (objSpssOut2.Visible)) Then objSpssOut2.Selected=True Print #1, "Table ";tblcntr;": ";objSpssOut2.Label sNewLabel = "Table " & tblcntr & ": " & objSpssOut2.Label objSpssOut2.Label = sNewLabel Set objPivotTable = objSpssOut2.ActivateTable objPivotTable.UpdateScreen = False 'sNewLabel = "Table " & tblcntr & ": " & objPivotTable.TitleText >>>> sNewLabel = "Table " & tblcntr & "¬" & objPivotTable.TitleText objPivotTable.TitleText = sNewLabel objSpssOut2.Deactivate objSpssOut2.Selected=False tblcntr = tblcntr + 1 End If Next GenIndx Thanks! Tim **************************** Notice: This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions. -----Original Message----- From: Oliver, Richard [mailto:[hidden email]] Sent: December 10, 2007 11:55 AM To: [hidden email]; [hidden email] Subject: RE: Line Feed Character Try: \n -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Tim Hennigar Sent: Monday, December 10, 2007 10:33 AM To: [hidden email] Subject: Line Feed Character Im running version 14 with all fixes Im using SAX basic script to modify pivot table titles by adding a table number I want to FORCE a line feed after the table number so the rest of the table title in on the next line - in there a key combination I can specify in my script to do this? Thanks! Tim **************************** Notice: This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions. ===================== 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 ===================== 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 ===================== 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 |
|
In reply to this post by Tim AT Home
Hi All,
I've installed the R-plug-in on V16 and can run commands fine, however I've downloaded the MCMC pack for R, and want to run a couple of the examples that come with the module. The data files are .RDA Does anyone know how I can load this file into SPSS? Is this possible? I've looked thought he SPSS-R integration manual and cannon see any info on doing this. I'm thinking in the future I might be nice to be able to load these files into SPSS do manipulations and drive some python code as well. Any ideas welcome ===================== 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 |
|
The assumption with the R plug-in is that data will originate from
SPSS. It may be worth opening R, loading the data and saving it in an SPSS file format using the foriegn package. HTH Jason On 12/11/07, Pearmain, Michael <[hidden email]> wrote: > Hi All, > > I've installed the R-plug-in on V16 and can run commands fine, however > I've downloaded the MCMC pack for R, and want to run a couple of the > examples that come with the module. > > The data files are .RDA > > Does anyone know how I can load this file into SPSS? Is this possible? > I've looked thought he SPSS-R integration manual and cannon see any info > on doing this. > > I'm thinking in the future I might be nice to be able to load these > files into SPSS do manipulations and drive some python code as well. > > Any ideas welcome > > ===================== > 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 > ===================== 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 |
|
I think that anything in an R data frame can be sent to SPSS as a dataset. So if there is some R command for reading the RDA data files, you should be able to do it all inside an R program block in an SPSS command syntax file.
________________________________ From: SPSSX(r) Discussion on behalf of Jason Burke Sent: Tue 12/11/2007 9:27 PM To: [hidden email] Subject: Re: Retrieving data from R The assumption with the R plug-in is that data will originate from SPSS. It may be worth opening R, loading the data and saving it in an SPSS file format using the foriegn package. HTH Jason On 12/11/07, Pearmain, Michael <[hidden email]> wrote: > Hi All, > > I've installed the R-plug-in on V16 and can run commands fine, however > I've downloaded the MCMC pack for R, and want to run a couple of the > examples that come with the module. > > The data files are .RDA > > Does anyone know how I can load this file into SPSS? Is this possible? > I've looked thought he SPSS-R integration manual and cannon see any info > on doing this. > > I'm thinking in the future I might be nice to be able to load these > files into SPSS do manipulations and drive some python code as well. > > Any ideas welcome > > ===================== > 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 > ===================== 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 ====================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 |
| Free forum by Nabble | Edit this page |
