Learn R Programming

genoPlotR (version 0.7)

human_nt: Human-readable nucleotide scale

Description

Return a human readable list from a nucleotide position or lenght.

Usage

human_nt(nt, signif = FALSE)

Arguments

nt
A nucleotide position
signif
Either a logical or an integer. If FALSE (default), nt is not rounded. Else, it returns signif significant digits.

Value

  • Returns a list with 4 elements
  • nA numeric value corresponding to nt divided by mult (see below).
  • tagA character, giving the multiplier used in text.
  • multThe muliplier used, in numeric value.
  • textA character, giving the value in a human readable format.

Details

Return a nucleotide value in nt, kb, Mb or Gb, according to the value given. This is particularly useful to display nice scales without too many trailing zeros.

Examples

Run this code
human_nt(123456)
human_nt(123456, signif=2)
human_nt(123456890, signif=2)

Run the code above in your browser using DataLab