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 is the function of catx syntax? : Sas-administrator
how do you pull data from equifax?tell me the process?
0 Answers Synchrony Financial,
How do you convert basic cube to transaction cube and transaction cube to basic cube?
If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?
How to write duplicate records into a separate dataset using sort?
is there any difference between proc summary and proc means?
There are 200 observations in a dataset, i want to pull out the observation no's 100, 150,180,190 by using Proc SQL? How you can get it?
Explain substr function?
How do dates work in SAS data?
when we are using the PROC TRANSPOSE? OBSERVATIONS are repeated then what will happen and what it will show in log window.
What is the difference between %local and %global?
How do you download a flat file from Mainframe to your local PC using SAS?