data_to_hist: data_to_hist

View source: R/tools.data_to_hist.R

data_to_histR Documentation

data_to_hist

Description

Just a function to transform two datasets into SparseHist, if X or Y (or the both) are already a SparseHist, update just the second

Usage

data_to_hist(X, Y)

Arguments

X

[matrix or SparseHist]

Y

[matrix or SparseHist]

Value

[list(muX,muY)] a list with the two SparseHist

Examples

X = base::cbind( stats::rnorm(2000) , stats::rexp(2000)  )
Y = base::cbind( stats::rexp(2000)  , stats::rnorm(2000) )

bw = base::c(0.1,0.1)
muX = SBCK::SparseHist( X , bw )
muY = SBCK::SparseHist( Y , bw )

## The four give the same result
SBCK::data_to_hist( X   , Y )
SBCK::data_to_hist( muX , Y )
SBCK::data_to_hist( X   , muY )
SBCK::data_to_hist( muX , muY )


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

Related to data_to_hist in SBCK...