[R] Left justification af dimnames in tables.

Ladelund, Steen STELAD01 at glostruphosp.kbhamt.dk
Mon Nov 22 11:57:40 CET 2004

Hi helpeRs.

When I do two-ways tables dimnames in columns are almost left-adjusted:
  <- factor(rbinom(30,1,.3),labels=c("first","second"))
>  b <- a
>  table(a,b)
a        first second
  first  21     0    
  second  0     9 

If I do a oneway table however, dimnames are right-adjusted:

 first second 
    21      9 

Actually I must admit I dont know if its the dimnames or/and the cell counts
that are adjusted ;-)

Is there a way that I can get left-adjusted dimnames i oneway tables.

Thans in advance


Steen Ladelund, statistician
+4543233275 stelad01FUNNYAglostruphospDOTkbhamt.dk
Research Center for Prevention and Health
Glostrup University Hospital, Denmark

More information about the R-help mailing list