scicloj.metamorph.ml.pretty

Categories

    Other vars: pretty

    pretty

    (pretty s opts impl)

    Compute pretty breaks using R function base::pretty.

    Parameters:

    • s sequence of values
    • opts options for pretty,
      • :n number of breask is supported by all implementations
    • impl An implementation keyword, either

    Each implementation requires dependencies to be added:

    Returns seq of the breaks, which R considers ‘pretty’

    Examples

    Use wit rejin

    (pretty (range 0 11) {:n 7} :renjin)
    ;;=> (0 2 4 6 8 10)

    Use wit wadogo

    (pretty (range 0 1 0.1) {:n 5} :wadogo)
    ;;=> (0.0 0.2 0.4 0.6 0.8 1.0)