Description Usage Arguments Details Value Author(s) Examples
Similar to 'table' function, this function builts a contingency table of the counts at each combination of all possible values from two integer-valued input vectors.
| 1 | groupcount(g1, g2, n1, n2)
 | 
| g1 | The first integer-valued input vector. The max value in g1 is n1. | 
| g2 | The second integer-valued input vector. The max value in g1 is n2. | 
| n1 | The maximum value in g1. | 
| n2 | The maximum value in g2. | 
This is implemented as an utility function to build a 2D histogram count table. For efficiency, it does not check if the maximum values in input vectors exceed the maximum values specified.
The count table.
Quanli Wang
| 1 2 3 4 5 | n1 <- 20
n2 <- 10
g1 <- sample.int(n1,1000, replace = TRUE)
g2 <- sample.int(n2,1000, replace = TRUE)
counts <- groupcount(g1,g2,n1,n2)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.