LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2001)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 13 Mar 2001 10:22:09 -0500
Reply-To:     kmcdonald@DMHMRSAS.STATE.VA.US
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         kmcdonald@DMHMRSAS.STATE.VA.US
Subject:      vector subscript
Content-Type: text/plain; charset="iso-8859-1"

I have the following data that I want to put into vectors:

id time1 time2 1 100 200 1 200 300 1 300 400 1 500 600 1 600 700 1 800 830 2 800 900 2 900 930

I want two vectors to include only the continuous observations for that id (ie the first 3 time1 variables in the vector, the first 3 time2 variables in another vector). I don't know the number of continuous observations, which would be the subscript for the vector. How can I get this number? I'm going to use the 2 vectors to create one record with id, time1 of the first record of the original data and time 2 of the last record of the original data so I don't need to create new vectors for the next set of continuous records.

Desired output:

id time1 time2 1 100 400 1 500 700 1 800 830 2 800 930

TIA

Kathy McDonald, MS Virginia DMHMRSAS PO Box 1797 Richmond, VA 23218-1797

phone: (804) 371-7428 fax: (804) 786-9248 email: kmcdonald@dmhmrsas.state.va.us


Back to: Top of message | Previous page | Main SPSSX-L page