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 would you create multiple observations from a single observation?
How would you include common or reuse to be processed along with your statements?
i have a null dataset with 10 variables; i want to print only name of the varibales in log window and also output window.how can we do this one?
create macros---you have 365 number of data and you need to merge it throw the macros,,,,,, data file1; input a @@; cards; 1 2 3 4 ; run; data file2; input a @@; cards; 5 6 7 8 ; run; data file3; input a @@; cards; 9 10 11 12 ; run;data file4; input a @@; cards; 13 14 15 16 ; run;
what versions of sas have you used (on which platforms)? : Sas programming
Difference b/n proc means and proc summary procedures?
How to create list output for cross-tabulations in proc freq?
What is instream data in SAS?
explain what is factor analysis? : Sas-administrator
What would be the value of month at the end of data step execution and how many observations would be there?
Explain input and put function?
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming