SPSS Statistics

Expand all | Collapse all

String Variable

  • 1.  String Variable

    Posted Tue August 17, 2021 09:04 AM
    I have a string variable 'email addresses' that's on several rows per organization.  I need to get all of these variables on the same row, and create different variables? - thanks

    ------------------------------
    Art Jack
    ------------------------------


  • 2.  RE: String Variable

    Posted Tue August 17, 2021 09:08 AM
    Hi. Look at the CASESTOVARIABLES command (you can abbreviate that to C2V in syntax).

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 3.  RE: String Variable

    Posted Tue August 17, 2021 09:20 AM
    Can you send me a syntax example?  - thanks.

    ------------------------------
    Art Jack
    ------------------------------



  • 4.  RE: String Variable

    Posted Tue August 17, 2021 09:42 AM
    preserve.
    set printback none.
    data list free /id (F3) emails (A64).
    begin data.
    001 first_1@test.com
    001 second_1@test.com
    002 me@check.org
    003 another@test.org
    003 asecond@spss.org
    003 email3@anotherprovider.info
    end data.

    SUMMARIZE ALL /FORMAT LIST NOTOTAL NOCASENUM /CELLS NONE /STATISTICS NONE
     /TITLE "BEFORE".

    SORT CASES BY id.
    CASESTOVARS /ID=id /GROUPBY=VARIABLE.

    SUMMARIZE ALL /FORMAT LIST NOTOTAL NOCASENUM /CELLS NONE /STATISTICS NONE
     /TITLE "AFTER".

    restore.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 5.  RE: String Variable

    Posted Tue August 17, 2021 10:48 AM
    cool, thanks.

    ------------------------------
    Art Jack
    ------------------------------