I have a dataset that needs cleaning.
I have a field with A,B,C,D..... intermingled with 1,2,3,4....
Example: IA1234576BBX
These are invalid rows for the data, as only 1,2,3,4.... should be the value.
What is the best function to delete these rows.
Best would be to flag them so I can set a flag identifying them as invalid.
SAS EG 7.1.5
TIA Jay
I would suggest using the FINDC function to check if there are any alphabetic characters in the field. e.g.:
error_flag=findc(testvar,,'A')>0;
I would suggest using the FINDC function to check if there are any alphabetic characters in the field. e.g.:
error_flag=findc(testvar,,'A')>0;
Thank you, nice to have that error_flag for future processing...
Thanks again... J
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.