paddedFloatToChar: Convert numeric to character with padding

Description Usage Arguments Value Author(s) Examples

Description

Convert numeric to character with padding

Usage

1
paddedFloatToChar(x, padL = ceiling(log10(x + 1)), padR = 3, pad = "0")

Arguments

x

numeric. Number to be converted to character with padding

padL

numeric. Desired number of digits on left side of decimal. If not enough, pad will be used to pad.

padR

numeric. Desired number of digits on right side of decimal. If not enough, pad will be used to pad.

pad

character to use as padding (nchar(pad)==1 must be TRUE). Passed to str_pad

Value

Character string representing the filename.

Author(s)

Eliot McIntire and Alex Chubaty

Examples

1
2
paddedFloatToChar(1.25)
paddedFloatToChar(1.25, padL = 3, padR = 5)


Search within the SpaDES package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.