Hi all,
I want to make a contingency table in R. I want to tabulate two variables, one
as the independent and second as the dependent variable. The IV has two
categories, namely, birth complications, and no birth complications. The
frequency of birth complication category is fifty, and the
Oh,
That's clearer now.
You should use two equal vectors when using table.
For example:
a - c(a,b,a,b,a,b,a,b)
b - c(1,1,1,1,2,2,2,2)
table(a,b)
also have a look at
?as.table
and
?matrix
Does that help ?
Tal
Contact
Dear Faiz,
I believe that your basic issue is that you are trying to use
frequencies directly. table() needs all the arguments to be of the
same length, because it counts the frequencies from raw data. So for
two variables, you need pairs of scores indicating whether there was a
birth
3 matches
Mail list logo