SparseHist: SparseHist

View source: R/tools.SparseHist.R

SparseHistR Documentation

SparseHist

Description

Return the Rcpp Class SparseHistBase initialized

Usage

SparseHist(X, bin_width = NULL, bin_origin = NULL)

Arguments

X

[matrix] Dataset to find the SparseHist

bin_width

[vector] Width of a bin for each dimension

bin_origin

[vector] Coordinate of the "0" bin

Value

[SparseHist] SparseHist class

Examples

## Data
X = base::matrix( stats::rnorm( n = 10000 ) , nrow = 5000 , ncol = 2 )
muX = SparseHist(X)

print(muX$p) ## Vector of probabilities
print(muX$c) ## Matrix of coordinates of each bins
print(muX$argwhere(X)) ## Index of bins of dataset X


SBCK documentation built on Sept. 11, 2023, 5:10 p.m.

Related to SparseHist in SBCK...