valsText: Rounds and changes decimal markers in single numeric values

Description Usage Arguments Value Examples

View source: R/valsText.R

Description

This function takes as input one numeric value, rounds and changes decimal markers whenever necessary.

Usage

1
valsText(x, dec = "default", digits = 3)

Arguments

x

Name of the object containing the numeric value.

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

To how many digitis should the value be rounded to? Default is 3.

Value

A string of text to be used in markdown documents.

Examples

1
2
x <- 5.46923
valsText(x, dec=",", digits=2)

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