| scale.BData | R Documentation |
Apply scaling and/or centering to a dataset of BData objects. Diverts all calculations to 'mean.BData'-instances as well as to 'msd.BData()' and the arithmetic operations.
## S3 method for class 'BData'
scale(x, center = TRUE, scale = TRUE, ...)
x |
data set to transform |
center |
either logical (default: TRUE) or the mean BData object to subtract from the elements of 'x' |
scale |
either logical (default: TRUE) or the scalar to divide the (centered?) elements of 'x' with |
... |
further generic arguments |
a data set of the same kind and size of 'x'
bdl = BDataDensities(list(\(x)(dnorm(x,1,1)),\(x)(dnorm(x,-1,1)) ),basis=B2N01Basis5,closed=TRUE)
bdlsc = scale(bdl)
msd(bdlsc) # should now be 1
mean(bdlsc)[[1]](-5:5) # should be 1 everywhere, i.e. the neutral element
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.