Learn R Programming

uniformly (version 0.5.0)

volume_sphere: Sphere volume

Description

Volume of a sphere (arbitrary dimension).

Usage

volume_sphere(d, r = 1)

Value

The volume of the sphere with radius r in the d-dimensional space.

Arguments

d

dimension of the space

r

radius of the sphere

Examples

Run this code
r <- 2
volume_sphere(3, r)
4/3*pi*r^3

Run the code above in your browser using DataLab