Frequency tables

Hello,

I am pretty new in R and I would like to calculate two different kind of frequencies from a two-way table. Ideally I would like to get two independent frequency tables as outputs.

View(MyData)

              C1    C2    C3   C4   ... Cm        TotalS

S1 xx xx xx xx xx yyyy
S2
S3
S4
.
.
Sj

TotalC zzz zzz zzz zz zzz

Then I need to calculate in each "cell" two frecuencies:

  1. xxx/yyy
  2. xxx/zzz

I would like to get the same table format as an output, but with the values calculated in "1" or "2".

Can somebody imagine how to do so?

Many thanks!,

Hi!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.