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 (November 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 24 Nov 2008 08:34:55 -0500
Reply-To:   Nathaniel.Wooding@DOM.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject:   Re: helppppppppppppp
Comments:   To: nikki <nikkihathi@GMAIL.COM>
In-Reply-To:   <2916fd87-dd85-4501-82b2-a43572bc75bd@e1g2000pra.googlegroups.com>
Content-Type:   text/plain; charset="US-ASCII"

Nikki

You have at least one solution that uses arrays. The one below uses Proc Transpose and to my thinking is a little more robust since you do not have to modify it in order to use it when you have varying numbers of variables.

Data Nikki; input V1 - V5; cards; 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 Proc Print; run; ** Note that in the output data set, I drop v1. Otherwise, we will have two output columns V1 and Col1. and we do not need both; Proc Transpose data = nikki out = Nikki2 ( Drop = _: V1 ); var _numeric_ ; by v1; run; Proc Print data = nikki2; run;

Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977

nikki <nikkihathi@GMAIL .COM> To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject helppppppppppppp

11/24/2008 03:54 AM

Please respond to nikki <nikkihathi@GMAIL .COM>

i want some codeing help.. i have a dataset with 20 * 20 numerical values... for example: 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5

i want output to be.... 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5

or 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

i'm just learing the sas coding .... COuld anyone help me with this Query

Thank you in advance

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.


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