| dist.BData | R Documentation |
Computes inter-distances between all objects of 'x'
## S3 method for class 'BData'
dist(x, ...)
## S3 method for class 'BDataLogDensities'
dist(x, ...)
## S3 method for class 'BDataSplines'
dist(x, ...)
x |
a data container of class 'BData' or derived |
... |
further parameters to 'stats::dist()', i.e. among other 'method' allows to use Manhattan or other Minkowski norms. |
a distance object, as 'stats::dist()'. The implementations rely on transformation to BDataSplines; the spline coefficients are first mapped to orthonormal coordinates via the Gram matrix of the basis, so that the default 'method = "euclidean"' yields the exact Bayes-space (clr-L2) distance also for non-orthonormal bases such as ZB-splines. Other 'method's (Manhattan, Minkowski, ...) operate on these orthonormal coordinates and depend on the chosen basis.
dist(BDataLogDensities): calculations for BDataLogDensities objects
dist(BDataSplines): calculations for BDataSplines objects
lbdl = BDataLogDensities(basis=B2N01Basis5, closed=TRUE,
list(
\(x)(dnorm(x,2,1,log=TRUE)),
\(x)(dnorm(x,1,1,log=TRUE)),
\(x)(dnorm(x,-1,1,log=TRUE)),
\(x)(dnorm(x,-2,1,log=TRUE))
))
dist(lbdl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.