Learn R Programming

BrailleR (version 0.3)

WhereXY: Count points in a scatter plot

Description

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 for both x and y variables.

Usage

WhereXY(x, y, grid = c(3, 3), Dist = "uniform")

Arguments

x
vector of x coordinates.
y
vector of y coordinates
grid
pair of values to split the graph into how many parts.
Dist
the distribution the variables might be expected to follow

Value

  • A text descriptionof the number of points in each subregion of the scatter plot. The table of counts should be compared to the expected number of points in each subregion.

Examples

Run this code
x=rnorm(50)
y=rnorm(50)
WhereXY(x,y)

Run the code above in your browser using DataLab