Re: [R] things that are difficult/impossible to do in SAS or SPSS but simple in R

From: Peter Dalgaard <>
Date: Thu, 17 Jan 2008 16:44:20 +0100

Max Kuhn wrote:
> Factors have huge benefits over character data in SAS. For a series
> regulatory filings, I had miles of SAS code to compute KxK tables
> where all the cells must show up. For example, if one of the levels of
> one of the variables was never observed, the corresponding row or
> column would not show up in proc freq. The basic way around this was
> to get all possible combinations of the variables and assign each cell
> to have a row count of 0.00000001. Then you would merge this data with
> the real counts. The missing row/columns would show up since they had
> data, but it was below the printing threshold of proc freq. Hoepfully,
> they have added a feature to do this.
I could have sworn that this was a fluke and that it would work if you put a user-defined format on the classification variable, but no go.... I can't find anything that does this, neither in PROC FREQ nor PROC TABULATE.

   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (                  FAX: (+45) 35327907

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 17 Jan 2008 - 15:49:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Jan 2008 - 23:30:07 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive