Learn R Programming

cluster (version 2.0.6)

volume.ellipsoid: Compute the Volume of Planar Object

Description

Compute the volume of a planar object. This is a generic function and a method for ellipsoid objects.

Usage

# S3 method for ellipsoid
volume(object)

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).

Value

a number, the volume of the given object.

See Also

ellipsoidhull for spanning ellipsoid computation.

Examples

Run this code
# NOT RUN {
## 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"
# }

Run the code above in your browser using DataLab