Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Deleting Observations with Characters
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  20 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
J M  
View profile  
 More options Jan 26, 2:27 pm
Newsgroups: comp.soft-sys.sas
From: jas...@UCLA.EDU (J M)
Date: Mon, 26 Jan 2009 11:27:55 -0800
Local: Mon, Jan 26 2009 2:27 pm
Subject: Deleting Observations with Characters
How can delete observations containing characters (eg 92z89 or abcd)?
I just want to keep observations with numeric values.
Thanks.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Matise  
View profile  
 More options Jan 26, 2:40 pm
Newsgroups: comp.soft-sys.sas
From: snoopy...@GMAIL.COM (Joe Matise)
Date: Mon, 26 Jan 2009 13:40:50 -0600
Local: Mon, Jan 26 2009 2:40 pm
Subject: Re: Deleting Observations with Characters
A few ways:

*Delete only containing a-zA-Z;
if anyalpha(var)>0 then delete;
*delete any non-numeric;
if notdigit(var)>0 then delete;

Also there is a PRX solution, if you prefer that route, but the above are
probably the easiest.  There are a lot of ANY and NOT functions - take a
look at the manual for more.

-Joe


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Akshaya Nathilvar  
View profile  
 More options Jan 26, 2:41 pm
Newsgroups: comp.soft-sys.sas
From: akshaya.nathil...@GMAIL.COM (Akshaya Nathilvar)
Date: Mon, 26 Jan 2009 14:41:01 -0500
Local: Mon, Jan 26 2009 2:41 pm
Subject: Re: Deleting Observations with Characters
One way to get this done is using PRXMATCH function.
Data want;
    input value $;
    if prxmatch("/[a-zA-Z]/",value)=0; /* Searches for a pattern match and
returns the position at which the pattern is found */
cards;
1023442
92z89
abcd
5231295
09CX42
98722
;

AkshayA!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
SAS_learner  
View profile  
 More options Jan 26, 3:10 pm
Newsgroups: comp.soft-sys.sas
From: procconte...@GMAIL.COM (SAS_learner)
Date: Mon, 26 Jan 2009 15:10:42 -0500
Local: Mon, Jan 26 2009 3:10 pm
Subject: Re: Deleting Observations with Characters
Hello Jason,

I do not weather you want to delete any Observation (Not a good Idea
depending what the value is )  seems like you are working some data cleaning
. In case you change and want to keep those observations too with numerical
part here is way I think

Why don't you consider using New Compress function ( If you Using sas9 or
above )

var = Compress ("Your variable", , "Kd") ;*Kd is keep digits I think *

Or if You are using SAS 8

Var = Compress ("Your Variable", "ABCDEFGHIJKLMNOPQRSTUVXYZ") * Hope I did
not miss a letter*

I have to try Joe Matise method a try seems to easy off course there is PRX
way but it is little bit confusing for beginners

thanks
SL


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arthur Tabachneck  
View profile  
 More options Jan 26, 4:29 pm
Newsgroups: comp.soft-sys.sas
From: art...@NETSCAPE.NET (Arthur Tabachneck)
Date: Mon, 26 Jan 2009 16:29:39 -0500
Local: Mon, Jan 26 2009 4:29 pm
Subject: Re: Deleting Observations with Characters
Jason,

If Howard's concern is valid and you need to keep numbers stated in
scientific notation, then I'd suggest the following method:

%LET N_Errors = %SYSFUNC(GETOPTION(Errors));
OPTIONS ERRORS=0;
data have;
  input var $5.;
  if missing(input(var,best12.)) then delete;
  cards;
1234
12a5
12E3
abcd
;
OPTIONS ERRORS=&N_Errors;

HTH,
Art
-----
On Mon, 26 Jan 2009 16:01:47 -0500, Howard Schreier <hs AT dc-sug DOT org>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Howard Schreier  
View profile  
 More options Jan 26, 4:01 pm
Newsgroups: comp.soft-sys.sas
From: hs AT dc-sug DOT org ("Howard Schreier)"
Date: Mon, 26 Jan 2009 16:01:47 -0500
Local: Mon, Jan 26 2009 4:01 pm
Subject: Re: Deleting Observations with Characters

On Mon, 26 Jan 2009 11:27:55 -0800, J M <jas...@UCLA.EDU> wrote:
>How can delete observations containing characters (eg 92z89 or abcd)?
>I just want to keep observations with numeric values.
>Thanks.

How about 12e3? It contains an alpha character but is nevertheless valid as
the external representation of a numeric value?

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"./ ADD NAME=Data _null_;"  
View profile  
 More options Jan 26, 4:42 pm
Newsgroups: comp.soft-sys.sas
From: iebup...@GMAIL.COM ("./ ADD NAME=Data _null_;")
Date: Mon, 26 Jan 2009 15:42:08 -0600
Local: Mon, Jan 26 2009 4:42 pm
Subject: Re: Deleting Observations with Characters
It is a bit easier to quiet invalid data messages with ??

if missing(input(var,??best12.)) then delete;

On 1/26/09, Arthur Tabachneck <art...@netscape.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Matise  
View profile  
 More options Jan 26, 5:12 pm
Newsgroups: comp.soft-sys.sas
From: snoopy...@GMAIL.COM (Joe Matise)
Date: Mon, 26 Jan 2009 16:12:03 -0600
Local: Mon, Jan 26 2009 5:12 pm
Subject: Re: Deleting Observations with Characters
Have to say, that's the first time I've come across ??.  Is that the only
place it works to suppress invalid messages, or does it work elsewhere?
(For example, a proc transpose where you have columns overwriting other
columns intentionally, etc.)?

-Joe

On Mon, Jan 26, 2009 at 3:42 PM, ./ ADD NAME=Data _null_; <


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"./ ADD NAME=Data _null_;"  
View profile  
 More options Jan 26, 5:48 pm
Newsgroups: comp.soft-sys.sas
From: iebup...@GMAIL.COM ("./ ADD NAME=Data _null_;")
Date: Mon, 26 Jan 2009 16:48:02 -0600
Local: Mon, Jan 26 2009 5:48 pm
Subject: Re: Deleting Observations with Characters
Format Modifiers for Error Reporting
?
suppresses printing the invalid data note when SAS encounters invalid
data values.

See Also: How Invalid Data is Handled

??
suppresses printing the messages and the input lines when SAS
encounters invalid data values. The automatic variable _ERROR_ is not
set to 1 for the invalid observation.

They work on input statement and INPUT function but not inputN/C.  As
far as PROC TRANSPOSE goes perhaps LET will produce the effect you
desire but I'm not sure exactly what you are referring to.  Can you
make example?

On 1/26/09, Joe Matise <snoopy...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J M  
View profile  
 More options Jan 26, 5:15 pm
Newsgroups: comp.soft-sys.sas
From: jas...@UCLA.EDU (J M)
Date: Mon, 26 Jan 2009 14:15:24 -0800
Local: Mon, Jan 26 2009 5:15 pm
Subject: Re: Deleting Observations with Characters
Looks good.
A crude, but safer form of this would be:
b=0;
if anyalpha(occ_cod)>0 then b=1;

Quoting Joe Matise <snoopy...@gmail.com>:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arthur Tabachneck  
View profile  
 More options Jan 26, 6:15 pm
Newsgroups: comp.soft-sys.sas
From: art...@NETSCAPE.NET (Arthur Tabachneck)
Date: Mon, 26 Jan 2009 18:15:37 -0500
Local: Mon, Jan 26 2009 6:15 pm
Subject: Re: Deleting Observations with Characters
Data _null_,

Thanks, as always, for the suggestion.  A much cleaner approach than the
one I proposed.

The only documentation I could find on ?? mirrors your summary:
http://xrl.us/bedu83

Interestingly, the manual also states that there are only 3 input
modifiers, namely $, : and ~

Art

p.s. Has Dr. G offered you a job yet?
--------
On Mon, 26 Jan 2009 16:48:02 -0600, ./ ADD NAME=Data _null_;


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
SAS_learner  
View profile  
 More options Jan 26, 7:48 pm
Newsgroups: comp.soft-sys.sas
From: procconte...@GMAIL.COM (SAS_learner)
Date: Mon, 26 Jan 2009 19:48:35 -0500
Local: Mon, Jan 26 2009 7:48 pm
Subject: Re: Deleting Observations with Characters
hello Howard,

HMMMM.... I think I need to write to Gmail team or request Howard which one
would be easier ?? Hope Howard is reading this. I really miss his expert
reply's may be all the Gmail users

thanks
SL

On Mon, Jan 26, 2009 at 7:38 PM, ./ ADD NAME=Data _null_; <


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Matise  
View profile  
 More options Jan 26, 7:57 pm
Newsgroups: comp.soft-sys.sas
From: snoopy...@GMAIL.COM (Joe Matise)
Date: Mon, 26 Jan 2009 18:57:45 -0600
Local: Mon, Jan 26 2009 7:57 pm
Subject: Re: Deleting Observations with Characters
I get it into my inbox perfectly fine :)  There's big bright lines
indicating his email address is not what he says it is, but it's fine.
(He's not being sent to spam because of the contents of the address, but
because it appears to be an email spoofing attempt; which is accurate,
except for the lack of malicious intent to non-spambots.)

Filter: If From contains (Howard Schreier)
Action: Never Send To Spam, Apply Label "SAS-L"

Don't create a filter based on his email address... create it based on his
name.  If that doesn't work, I don't know what to tell you, other than ...
my gmail is nicer than yours?

-
Joe

On Mon, Jan 26, 2009 at 6:38 PM, ./ ADD NAME=Data _null_; <


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
SAS_learner  
View profile  
 More options Jan 26, 7:11 pm
Newsgroups: comp.soft-sys.sas
From: procconte...@GMAIL.COM (SAS_learner)
Date: Mon, 26 Jan 2009 19:11:36 -0500
Local: Mon, Jan 26 2009 7:11 pm
Subject: Re: Deleting Observations with Characters
Hello  _null_,

Did you figure out how to get Howard's email to Gmail Inbox. If so can you
let me know ??

Thanks
SL

On Mon, Jan 26, 2009 at 5:48 PM, ./ ADD NAME=Data _null_; <


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"./ ADD NAME=Data _null_;"  
View profile  
 More options Jan 26, 7:38 pm
Newsgroups: comp.soft-sys.sas
From: iebup...@GMAIL.COM ("./ ADD NAME=Data _null_;")
Date: Mon, 26 Jan 2009 18:38:41 -0600
Local: Mon, Jan 26 2009 7:38 pm
Subject: Re: Deleting Observations with Characters
No Howard's e-mail refuses to be accepted by gmail as anything but
spam.  I can "STAR" them and that makes them easier to find in the
spam box.

The only think I can think of is that JUNK in the e-mail address is
too much for G-Mail's spam filter to resist.

I continue to check my spam box throughout the day and look forward to
seeing spam that has been starred.

Thankfully e-mail from "Ajay who's it" does end up in the spam box as directed.

On 1/26/09, SAS_learner <procconte...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Matise  
View profile  
 More options Jan 26, 7:29 pm
Newsgroups: comp.soft-sys.sas
From: snoopy...@GMAIL.COM (Joe Matise)
Date: Mon, 26 Jan 2009 18:29:47 -0600
Local: Mon, Jan 26 2009 7:29 pm
Subject: Re: Deleting Observations with Characters
You have to create a filter specifically marking mail from him not as spam.
IIRC, gmail will do that directly for you if you mark it as 'not spam' from
the spam box.

_null_, the example would be something like

data test;  *this is the output from a generated proc means statement;
input stat $ value;
datalines;
T2B_q4 75.8
N_q4 80
T3B_q4 88.3
N_q4 80
;;;;
run;
proc transpose data=test out =test2 let;
id stat;
var value;
run;

The ? doesn't seem to do anything here, as far as I can tell, so that
probably answers my question :)  In theory I could (obviously) parse the
dataset for the known duplicate values and remove them, but with the size of
the data involved it's more efficient to simply ignore them, PROC PRINTTO to
send my log to a dummy file, and not worry about it (as much as I hate
leaving that bit of the log out).  Otherwise with the number of observations
I have, it takes a dozen or so clears of the log while it's running, and
takes longer to write the log out than to do the proc :)

-Joe


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe Matise  
View profile  
 More options Jan 26, 8:33 pm
Newsgroups: comp.soft-sys.sas
From: snoopy...@GMAIL.COM (Joe Matise)
Date: Mon, 26 Jan 2009 19:33:20 -0600
Local: Mon, Jan 26 2009 8:33 pm
Subject: Re: Deleting Observations with Characters
No idea... these are the options I get when I create a filter, and then
"Next Step": (They're images, so I imagine this won't look interesting on
the actual list - sorry!)

Choose action - Now, select the action you'd like to take on messages that
match the criteria you specified.When a message arrives that matches the
search: from:(Howard Schreier), do the following:  Skip the Inbox (Archive
it)
Mark as read
Star it
Apply the label: New label...-----RestSASLuseful sas
Forward it to:
Delete it
Never send it to Spam
Show current filtersCancel=AB BackUpdate Filter   Also apply filter to 170
conversations below.

Text:
* Skip the Inbox (Archive It)
* Mark as read
* Star it
* Apply the label: (labels)
* Forward it to: (textbox)
* Delete it
* Never send it to Spam

I got to that from Settings -> Filters -> edit the particular filter -> Nex=
t
Step.

-Joe

On Mon, Jan 26, 2009 at 7:22 PM, ./ ADD NAME=3DData _null_; <


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"./ ADD NAME=Data _null_;"  
View profile  
 More options Jan 26, 8:22 pm
Newsgroups: comp.soft-sys.sas
From: iebup...@GMAIL.COM ("./ ADD NAME=Data _null_;")
Date: Mon, 26 Jan 2009 19:22:09 -0600
Local: Mon, Jan 26 2009 8:22 pm
Subject: Re: Deleting Observations with Characters
Never Send To Spam is not a choice when I create a filter.  What is
different?  I thought gmail was gmail.

On 1/26/09, Joe Matise <snoopy...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"./ ADD NAME=Data _null_;"  
View profile  
 More options Jan 26, 8:00 pm
Newsgroups: comp.soft-sys.sas
From: iebup...@GMAIL.COM ("./ ADD NAME=Data _null_;")
Date: Mon, 26 Jan 2009 19:00:23 -0600
Local: Mon, Jan 26 2009 8:00 pm
Subject: Re: Deleting Observations with Characters
I did create a filter it does everything but put Howard's e-mail in
the right box.  You use gmail have you been successful.  Maybe it has
to do with versions of IE or something.

As for the Transpose I would take a step back to create the output
from PROC MEANS that was better suited to my needs.  If you want to
talk about that it would make an interesting, I think, topic for a new
thread.

On 1/26/09, Joe Matise <snoopy...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
SAS_learner  
View profile  
 More options Jan 26, 10:07 pm
Newsgroups: comp.soft-sys.sas
From: procconte...@GMAIL.COM (SAS_learner)
Date: Mon, 26 Jan 2009 22:07:21 -0500
Local: Mon, Jan 26 2009 10:07 pm
Subject: Re: Deleting Observations with Characters
Thank you Joe I did what ever you said Let see if it works when Howard mail=
s
back

SL


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google