| -.dist | R Documentation |
dist objects.Unary: returns negated distribution (e.g., -N(mu, var) = N(-mu, var)) Binary: creates expression distribution and simplifies to closed form when possible (e.g., normal - normal = normal, normal - scalar = normal).
## S3 method for class 'dist'
x - y
x |
A |
y |
A |
A simplified distribution or edist if no closed form exists
# Difference of normals simplifies to a normal
z <- normal(5, 2) - normal(1, 3)
z # Normal(mu = 4, var = 5)
# Unary negation
-normal(3, 1) # Normal(mu = -3, var = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.