Date: Mon, 15 Jun 2009 11:57:17 -0400
Reply-To: Peter Flom <firstname.lastname@example.org>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Flom <peterflomconsulting@MINDSPRING.COM>
Subject: Re: Complex transpose problem (I think)
Content-Type: text/plain; charset=UTF-8
I think I am figuring out another way to do this .... no transposes,
but several arrays. I don't need to change variables to observations, I need to operate
>From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
>Sent: Jun 15, 2009 10:03 AM
>Subject: Re: Complex transpose problem (I think)
>Unfortunately (or maybe, fortunately) I only have time for quick replies
>If each line has some unique identifer or group of ids, you could write
>Proc Transpose data = start out = end;
> var _all_ ;
>This would give you your id columns , Col1, and _name_. There would be some
>rows that would include the values of the id values since they would be
>automatically included in _all_ but you could get rid of these by deleting
>the values of _name_ that matched the former ID variable name(s). The
>downside of this quick and dirty approach is that Col1 will be character.
>You could do one transpose with _character_ and another with _numeric_ and
>then merge the results later.
>Parsing out the strings with the underscores will take a little work since
>you say that there are varying numbers of terms possible and you will
>probably have to check the values in order to see what you are reading.
>My usual suggestion when I see data of this type is to suggest that someone
>needs to discuss the foolishness of recording some mangled information. I
>understand that there is a Mr. Anthony Soprano who lives in your general
>area and they he has been most persuasive in the past. He might be a good
>Environmental Specialist III
>Dominion, Environmental Biology
>4111 Castlewood Rd
>Richmond, VA 23234
>Phone:804-271-5313, Fax: 804-271-2977
> Cel Phone: 804-205-0752
> Peter Flom
> ing@MINDSPRING.CO To
> M> SAS-L@LISTSERV.UGA.EDU
> Sent by: "SAS(r) cc
> <SAS-L@LISTSERV.U Subject
> GA.EDU> Complex transpose problem (I think)
> 06/15/2009 09:48
> Please respond to
> Peter Flom
>People do give data in odd formats, don't they?
>This time I have the following. An Excel data set on EEG in 5 subjects (it
>will go up), but about 200 columns. Variables
>are name, age, sex, and a lot of variables of this form MG_1_CP_RS_T_LH,
>which are numeric.
>Age and sex are straightforward ... nothing else is.
>Name looks like this AHMED_2nd_light_on_30, where the first bit is a name,
>the second bit is session, and the rest describes the session.
>That's not too bad, I can use character functions to create new variables.
>It's the other variables that are a problem.
>for instance, MG means "Mean gamma" (this bit can also be BG or PG)
>1 means first recording (it can be 1 or 2)
>CP means centripetal (it could also be CF for centrifugal)
>RS means rightward saccade (it could also be LS for leftward saccade)
>T describes eye movement (can be O, F, C, P, T, or E)
>LH means left hemisphere (could also be RH)
>and the number of underscores varies.
>I need to create some new variables using formulas that are in another
>Then I need to do things like compare CP to CF, or compare PG/MG for each
>lobe (LH vs RH)
>So I need to create variables like VAR (for the first bit), recording,
>inout, rightleft, movement, and hemisphere.
>But I am not at all sure how to do this. I am pretty sure it's a
>Any help appreciated
>Peter L. Flom, PhD
>www DOT peterflomconsulting DOT com
>CONFIDENTIALITY NOTICE: This electronic message contains
>information which may be legally confidential and or privileged and
>does not in any case represent a firm ENERGY COMMODITY bid or offer
>relating thereto which binds the sender without an additional
>express written confirmation to that effect. The information is
>intended solely for the individual or entity named above and access
>by anyone else is unauthorized. If you are not the intended
>recipient, any disclosure, copying, distribution, or use of the
>contents of this information is prohibited and may be unlawful. If
>you have received this electronic transmission in error, please
>reply immediately to the sender that you have received the message
>in error, and delete it. Thank you.
Peter L. Flom, PhD
www DOT peterflomconsulting DOT com