meansdText: Generates strings of text for the use in markdown documents

Description Usage Arguments Value Examples

View source: R/meansdText.R

Description

This function takes as input one vector and returns its mean and standard deviation in the most standard notation (mean ± sd).

Usage

1
meansdText(x, dec = "default", digits = c(1, 1))

Arguments

x

A numeric vector

dec

Which decimal separator should be used? Defaults to ".". Allows to quickly changing to a comma in case you are producing a manuscript in German or Portuguese.

digits

How many digits should be kept for each piece of numeric information? Defaults to c(1, 1).

Value

A string of text to be included in a markdown object.

Examples

1
2
3
4
x <- rnorm(50, mean=10, sd=20)
meansdText(x)
# Rounding 
meansdText(x, digits=c(3, 3))

eduardohet/resulteR documentation built on Aug. 9, 2021, 3:02 a.m.