Learn R Programming

Hmisc (version 5.2-1)

nCoincident: nCoincident

Description

Number of Coincident Points

Usage

nCoincident(x, y, bins = 400)

Value

integer count

Arguments

x

numeric vector

y

numeric vector

bins

number of bins in both directions

Author

Frank Harrell

Details

Computes the number of x,y pairs that are likely to be obscured in a regular scatterplot, in the sense of overlapping pairs after binning into bins x bins squares where bins defaults to 400. NAs are removed first.

Examples

Run this code
nCoincident(c(1:5, 4:5), c(1:5, 4:5)/10)

Run the code above in your browser using DataLab