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 frequency of no birth complication category is 34. The categories and frequencies of DV follows. Schizophrenic 28, depressed 26, normal 30. When I am trying to make a contingency table in R, using table(name of variable one,name of variable two), I am getting an error that all arguments must have the same length. I believe that there would be two rows and three columns according to categories of IV and DV, But I guess R wants a third row for IV. When I am trying my luck with data.frame(var1,var2), I receive an error "arguments imply differing number of rows". Any suggestion on how I can make a contingency table using the data above?

My second question is a result of my inability to see the screen. I want to know that what is the difference between the tables you can make using table () and data.frame (). When I think of a table in my mind, I think of horizontal rows and vertical columns presenting data on different variables. But I  am not sure what type of tables data.frame () prints on the screen and what type of tables table () prints on the screen. and which function should I use when I want to make  tables you are suppose to make in statistics.

Thank you all, and sorry for such basic questions.
faiz.




	[[alternative HTML version deleted]]

