count the number of points that fall into various sized subparts of a scatter plot. The graphing region can be split into cells based on a uniform or normal marginal distribution separately for the x and y variables.
A text description of the number of points in each subregion of the scatter plot. The table of counts can then be compared to the expected number of points in each subregion.
Arguments
x,y
vectors of x coordinates. If y is not specified, the function expects x to be a two-column matrix with x and y values in columns 1 and 2 respectively.
grid
pair of values to specify the way the graph is to be split into parts. Specify x and then y.
xDist,yDist
the distribution the variables might be expected to follow. The default is to consider uniformly distributed but any alternative text will lead to an assumption of both margins being normally distributed.
addmargins
logical: should sums be added to both rows and columns.