SparseHist {SBCK} | R 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
[Package SBCK version 1.0.0 Index]