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 |
How could you generate test data with no input data?
how do we mail reports from SAS environment to our team leader
What are the five ways to do a table lookup in sas? : sas-grid-administration
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable?
what are the three main credit bureau names
1 Answers Synchrony Financial,
how many types of MERGE?
What do you feel about hardcoding?
how does sas handle missing values in assignment statements? : Sas programming
How to convert a given date value into SAS date
9 Answers CitiGroup, Quintiles,
why is sas considered self-documenting? : Sas programming
how to import XTP files into SAS datasets?
1 Answers Barclays, Institute For Plasma Research,
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?