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
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;
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.
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of JD
Sent: Sunday, November 22, 2009 11:23 PM
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.