geo.sdR Documentation

Calculate geometric standard deviation and round

Description

Calculate the geometric standard deviation

Usage

geo.sd(num, na.rm = TRUE, neg.rm = TRUE, round = 2)

Arguments

num

vector of numbers

na.rm

remove NAs from the vector

neg.rm

remove negative values from the vector

round

round result to decimal place

Value

the geometric standard deviation of a set of numbers

Examples

num1 <- sample(330:400,20)

#get geometric SD remove negative values and round to 2 decimal places
geo.sd(num1)

#get geometric SD, DON'T remove negative values and round to 2 decimal places
geo.sd(num1,na.rm=FALSE)

#get geometric SD, remove negative values and round to 3 decimal places
geo.sd(num1,round = 3)