BDataOperations: Operations for BData objects

+.BDataR Documentation

Operations for BData objects

Description

BData objects are considered a elements of a BayesSpace and operated accordingly to Bayes space rules, using the functions [Add], [Sub], [Mul], [Div]. For operating with a scalar, please use the BData object first.

Usage

## S3 method for class 'BData'
x + y

## S3 method for class 'BData'
x - y

## S3 method for class 'BData'
x * y

## S3 method for class 'BData'
x / y

Arguments

x

a BData value to be operated

y

another value, like e.g. another BData value or a scalar

Value

A BData object of the same class as 'x', resulting from the corresponding Bayes-space operation (addition, subtraction, scalar multiplication, or scalar division).

Functions

  • - : Bayes space subtraction divides densities

  • * : Bayes space multiplication works only with scalars

  • / : Bayes space division only works with scalars and leads to do the y-th root

Examples

X <- BDataSplines(t(1:5),B2Unif01Basis5)
X+X

DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.