trouble with contingency table in R -


i looked everywhere did not find answer question. having trouble makig contingency table. have data many columns, let 1, 2 , 3. in first column there let 100 different values, in second 20 , third column has 2 possible values: 0 , 1. first take data value 1 in column 3 (data<-data[column3==1,]). have around 20 different values in 1. column , 5 in 2. column. when contingency table size 100x20, not 20x5, , contains lot of zeros (they correspond combination of column1 , column2 has value 0 in column3). greatful every kind of help, thanks.

just use

table()

function data after doing

data<-data[column3==1,])

it might helpfull


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -