[R] R equivalent of SAS proc freq

David Winsemius dwinsemius at comcast.net
Sun Jul 25 15:49:38 CEST 2010


On Jul 25, 2010, at 9:32 AM, Sébastien Bihorel wrote:

> Dear R-users,
>
> I am looking for a R function that would be the equivalent of the  
> SAS proc
> freq (
> http://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#/ 
> documentation/cdl/en/procstat/63104/HTML/default/ 
> procstat_freq_sect006.htm).
> The table, ftable, xtabs functions are close but do not quite offer  
> the same
> capabilities (e.g. they just return counts and no %ages as far as I  
> could
> tell).
> I wanted to check with the group if there would already be such a  
> function
> in base or in a contribution package, before I start coding my own  
> function.

There are a couple of efforts to imitate the Proc FREQ output in the  
archives. If you use one of the several search facilities (e.g. RSeek,  
the RSiteSearch function or the ??? function in the sos library) you  
will get links to those:

(A test of this theory with RSeek pointed to the CrossTable function  
in gmodels.)

Try also with...

?RsiteSearch

RSiteSearch()

Or with ...

require(sos)
???"proc freq sas"

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list