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:
xxx/yyy
xxx/zzz
I would like to get the same table format as an output, but with the values calculated in "1" or "2".
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: