Skip to contents

Convert numbers of base into string with order of magnitude (Kbp, Mbp, Gbp) and vice versa.

Usage

GenomicSystem(x, digits = 3)

Arguments

x

: The number to convert or string to convert.

digits

: The number of significant digits to be used. See signif() for more informations. (Default 3)

Value

The converted number or string.

Details

GenomicSystem

Examples

GenomicSystem(1540, 3)
#> [1] "1.54Kbp"
GenomicSystem(1540, 2)
#> [1] "1.5Kbp"
GenomicSystem("1Mbp")
#> [1] 1e+06
GenomicSystem("1Kbp")
#> [1] 1000
GenomicSystem("1k")
#> [1] 1000