meanRange: Return Estimated Mean and Range as Character String

Description Usage Arguments Value Author(s)

Description

This is a very simple function, which allows for estimation of means and ranges, and formatting the result as a character string. Significant digits may be specified, and the number of values from which the mean and range are computed may be returned if ssize is TRUE.

Usage

1
meanRange(x, digits, ssize=TRUE, type="arithmetic")

Arguments

x

A vector of numeric values.

digits

The number of significant digits to report. The default is to report three digits.

ssize

Boolean; should the number of observations from which mean and range are computed be returned?

type

A character string corresponding to the type of mean to be estimated, i.e. arithmetic, geometric, or harmonic.

Value

A named numeric vector, with one element if ssize is FALSE, and two elements if it is TRUE.

Author(s)

Ryan Kyle, ryan.kyle@mail.mcgill.ca


rpkyle/cscmisc documentation built on May 13, 2019, 12:06 p.m.