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 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 23 Nov 2009 07:25:45 -0500
Reply-To:     Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Subject:      Re: Dropping columns with no obs
In-Reply-To:  <3cf9f5a80911222023m11f8afe4vb85d0f5c0fe26a41@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"

Unless the transpose step takes more than a couple minutes to run, the simplest thing to do is to drop the values before they are transposed. If the variable to be transposed it called Value, then

Proc Transpose Data = InitialData ( where = ( Value ne . )) out = Wanted; Etc

Now, please tell us a little more about why you needed to create a set of dummy dates and merge this with your original data in order to get dates in chronological order. I think that you are making your overall task harder.

And, please respond to the list and not to me directly. I will be on line infrequently this week and it might be a while before I saw your reply.

Nat Wooding

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of JD Sent: Sunday, November 22, 2009 11:23 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Dropping columns with no obs

I have a transposed dataset by date. The dataset has 90 days in it but some of the days do not have any obs. Is there an easy way to drop all days that do not have data?

The way I got the dates in chronological order in the first place is by creating a dataset with dates and then merging with my original data. Since the dates from the 'dates' datasets includes all dates but the original dataset doesn't include any dates with missing data, I end up with a merged dataset with the missing dates. Now I just need to drop the extraneous date columns. Thanks 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