format_values: Formats values for lyx

View source: R/save_tex_value.R

format_valuesR Documentation

Formats values for lyx

Description

Formats values for lyx

Usage

format_values(values, percent, accuracy, digits, translate)

Arguments

values

Numeric, character or logical vector of values to be saved. Logical values will be saved as character.

percent

Logical scalar or vector. If values is a numeric vector percent indicates whether to save values as percents or as is. If you want only a subset of values to be saved as percents percent should be a logical vector indicating the positions of these values.

accuracy

A number to round percent values to. Use (e.g.) 0.01 to show 2 decimal places of precision. Defaults to 1 i.e round to the nearest integer.

digits

The desired number of digits after the decimal point for numeric non-percent values. Defaults to 2 digits after the decimal point.

translate

Logical indicating whether to save values in LaTeX format. See latexTranslate.

Value

A formatted character vector.


Ori-Shoham/savetolyx documentation built on Oct. 29, 2022, 3:42 a.m.