[R] access (exactly/only) one dimension of a multidimensional table

Stefan Uhmann stefan.uhmann at mailbox.tu-dresden.de
Wed Nov 5 11:08:51 CET 2008


Dear list,

I have a multi(3)dimensional table, which is printed as two tables:

 > table.a
, ,  = female


       not at all a little medium heavy
   no          53       27      8     6
   yes         30       67     61    66

, ,  = male


       not at all a little medium heavy
   no          31       20     11     5
   yes          5       19     34    25

How can I access (manipulate) only the first table (female)?
I want to calculate the percentages for each gender group, i.e. dividing 
each table/array by the sum of of this table/array. And I want to keep 
the structure you see, because I use it already for plotting the data.

Any suggestions or would I have to stick to the original data?

Thanks in advance,
Stefan



More information about the R-help mailing list