Learn R Programming

MCI (version 1.0.1)

geom: Geometric mean

Description

Computes the geometric mean of a numeric vector.

Usage

geom(x)

Arguments

x
A numeric vector

Value

  • The value of the geometric mean.

Examples

Run this code
numvec <- c(10,15,20,25,30)  
# Creates a numeric vector "numvec"
mean(numvec)  
# Mean of numvec
geom(numvec)  
# Geometric mean of numvec

Run the code above in your browser using DataLab