i have a dataset with 25 obs; 10th obs has like
ramu,anji,ramu,azad,ramu like this. i want to know how many
times the word repeats in that obs?
Answers were Sorted based on User's Feedback
Answer / alok karan
data repeat;
x="ramu anji ramu azad ramu";
y=count(x,"ramu");
run;
proc print data=repeat;
run;
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / aarti
Data DS;
INFILE datalines;
input name $;
datalines;
ram
sham
seema
amit
sham
sushil
amit
seema
ravi
run;
proc sql;
create table rep as
select name,count(name) as cnt from ds group by 1;
quit;
proc print data=rep;
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / vivek
Data DS;
INFILE datalines;
input name $;
datalines;
ram
sham
seema
amit
sham
sushil
amit
seema
ravi
run;
proc freq data = ds;
table name;
output out =dsfrq;
run;
Is This Answer Correct ? | 1 Yes | 2 No |
What are symbol tables?Differemce between Local N Global Symbol tables.....
what is the SAS/ACCESS and SAS/CONNECT?
9 Answers Accenture, iFlex, TCS,
proc means? proc sort? proc append? proc freq? proc print? proc content?
Compare sas with other data analytics tools.
Name statements that are execution only.
How to convert .xls file into CSV format?
what is incremental update ? is this possible in SAS OLAP CUBE STUDIO.
What are the difference between sas functions and procedures?
Do you need to rearrange the order of the data for the report?
what is fact table and factless table?
Why is a STOP statement needed for the point=option on a SET statement?
Mention what is the difference between nodupkey and nodup options?