Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

volume.ellipsoid

Compute the Volume (of an Ellipsoid)


Description

Compute the volume of geometric R object. This is a generic function and has a method for ellipsoid objects (typically resulting from ellipsoidhull().

Usage

volume(object, ...)
## S3 method for class 'ellipsoid'
volume(object, log = FALSE, ...)

Arguments

object

an R object the volume of which is wanted; for the ellipsoid method, an object of that class (see ellipsoidhull or the example below).

log

logical indicating if the volume should be returned in log scale. Maybe needed in largish dimensions.

...

potential further arguments of methods, e.g. log.

Value

a number, the volume V (or \log(V) if log = TRUE) of the given object.

Author(s)

Martin Maechler (2002, extracting from former clusplot code); Keefe Murphy (2019) provided code for dimensions d > 2.

See Also

ellipsoidhull for spanning ellipsoid computation.

Examples

## example(ellipsoidhull) # which defines 'ellipsoid' object <namefoo>

myEl <- structure(list(cov = rbind(c(3,1),1:2), loc = c(0,0), d2 = 10),
                   class = "ellipsoid")
volume(myEl)# i.e. "area" here (d = 2)
myEl # also mentions the "volume"

set.seed(1)
d5 <- matrix(rt(500, df=3), 100,5)
e5 <- ellipsoidhull(d5)

cluster

"Finding Groups in Data": Cluster Analysis Extended Rousseeuw et al.

v2.1.2
GPL (>= 2)
Authors
Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Peter Rousseeuw [aut] (Fortran original, <https://orcid.org/0000-0002-3807-5353>), Anja Struyf [aut] (S original), Mia Hubert [aut] (S original, <https://orcid.org/0000-0001-6398-4850>), Kurt Hornik [trl, ctb] (port to R; maintenance(1999-2000), <https://orcid.org/0000-0003-4198-9911>), Matthias Studer [ctb], Pierre Roudier [ctb], Juan Gonzalez [ctb], Kamil Kozlowski [ctb], Erich Schubert [ctb] (fastpam options for pam(), <https://orcid.org/0000-0001-9143-4880>), Keefe Murphy [ctb] (volume.ellipsoid({d >= 3}))
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.