/* tabulate in R */ new; cls; b={9,1,3,6,8,3,1,1,4,9,3}; print tabulate(b,10); proc tabulate(b,nb); local x,i; x=zeros(nb,1); i=1; do while i<=nb; x[i]=sumc(b.==i); i=i+1; endo; retp(x); endp;