scatter | R Documentation |
Create a filter matrix that multiplying the vector of counts from a complete contingency table, gives a collapsed contingency table.
scatter(y,s)
y |
is the observed contingency table. Provides a target length only. |
s |
is a vector of indices, one for each cell of the full (unobserved)
contingency table, representing the appropriate cell of |
S |
A matrix of orthogonal columns of 1s and 0s |
David L Duffy
y<-double(3) z<-1:5 z %*% scatter(y,c(1,1,2,3,3)) ## 1+2, 3, 4+5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.