Hi guys, I have my dataset in SAS as follows DATA table;
INPUT AGE$;
CARDS;
053
047
081
029
029
029
029
053
012
;
RUN; As result What I want is to create a new variable in a column based on the frequency value of age '029', so that the new column has the value '4' in each row. I have tried to use the COUNT function, but it only gives me '1' in the row where '029' is. DATA table2;
SET table1;
NEWVAR = count(AGE,'029');
run; But I do not want this. In Excel is easy to do, let me illustrate my desired result. All I used in excel was =COUNTIF($A$2:$A$10,29). How to do the same thing in SAS? I will really appreciate your answer.
... View more