Learn R Programming

netdiffuseR (version 1.16.2)

grid_distribution: Distribution over a grid

Description

Distribution of pairs over a grid of fix size.

Usage

grid_distribution(x, y, nlevels = 100L)

Arguments

x
Numeric vector of size $n$
y
Numeric vector of size $n$
nlevels
Integer scalar. Number of bins to return

Value

  • Returns a list with three elements
  • xNumeric vector of size nlevels with the class marks for x
  • yNumeric vector of size nlevels with the class marks for y
  • zNumeric matrix of size nlevels by nlevels with the distributionof the elements in terms of frecuency

Examples

# Generating random vectors of size 100 x <- rnorm(100) y <- rnorm(100)

# Calculating distribution grid_distribution(x,y,20)

Details

This function ment for internal use only.

See Also

Used by plot_infectsuscep