Hi.
what does the " =: " mean?
Thank you.
Anca.
Hi Antea,
Following is my data.
Data sample:
Set sample;
Amd1_9-;
AMD1_10-;
Run;
AMD1_9-History of another malignancy within the previous 5 years other than curatively treated non-
melanomatous skin cancer
AMD1_10-Current or prior treatment with estrogens and/or drugs with anti-androgenic properties such
as spironolactone > 50mg/kg, or progestational agents for the treatment of prostate cancer less than 6
months prior to randomization .
I need my new variable sample:
"History of another malignancy within the previous 5 years other than curatively treated non-
melanomatous skin cancer"
hmmm, something like this:
Data sample;
input sample $50.;
cards;
AMD1_9-History of another malignancy within
AMD1_10-Current or prior treatment with estrogens
;
Run;
proc print;run;
data want;
set sample;
new_sample = prxchange("s/.*[-]//i",1,(sample));
run;
proc print;run;
new_sample = prxchange("s/.*[-]//i",1,(sample));
could u please tell me what i have to place in s and i
You don't need to change either of those s, or i (those are keywords for s = string, and i = case insensitive)
the variable name is sample, right?
The "=:' sets the length of the right side argument to the length of the left side argument.
So - if the left argument is 1 character, the "=:' will only look at the first character of the right side argument.
Very handy.
Thanks!
Thank you very much Tilea. Your suggestions were of great help.
regards,
Murali.
its working but my last char in word is truncating
ex :fever
as feve .
could u tell me any other way
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.