View source: R/tools.SparseHist.R
SparseHist | R Documentation |
Return the Rcpp Class SparseHistBase initialized
SparseHist(X, bin_width = NULL, bin_origin = NULL)
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 |
[SparseHist] SparseHist class
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.