simple_mean: Mean <c2><b1> SEM

Description Usage Arguments Value Examples

View source: R/simple_mean.R

Description

Calculate mean an standard error from a numeric vector and return a character string.

Usage

1
simple_mean(x, digits = 2, units = "", na.rm = FALSE)

Arguments

x

numeric vector.

digits

Minimum number of signiicant digits past the decimal point to keep. Default: 2.

units

(optional) string vector with units, Default: NULL

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Value

A string with the format "Mean <c2><b1> SEM"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
if(interactive()){
 ## Basic example
 x <- rnorm(50 + rnorm(50))
 simple_mean(x, digits = 3)

 ## With units
 simple_mean(iris$Petal.Length, units = "cm")
 }

## End(Not run)

jcpsantiago/paprHelper documentation built on May 17, 2019, 7:28 p.m.