adjustQscale: Adjust a quantity scale to a value and/or prefix and unit...

Description Usage Arguments Details

Description

Adjust a quantity scale to a value and/or prefix and unit constraints

Usage

1
2
adjustQscale(x, to = NULL, mode = "fraction", prefix = NULL,
  unit = NULL)

Arguments

x

a quantity

to

a numerical 'target' value

mode

character string which may have the following values 'max', if 'to' is the maximum value, 'min' if 'to' is the minimum value, 'round, if 'x' should be 'rounded' to 'to', and 'fraction' if the fraction 'x'/'to' should be minimized.

prefix

NULL or a characxter vector with the prefixes allowed. The vector may coantain two special values '=' and'1000s'. '=' denotes the prefix of x, '1000s' all prefixes except 'hecta', 'deca', 'deci', and 'centi'. If NULL all prefixes are allowed.

unit

NULL or a character vector with the units allowed. The vector may contain also a '=', denoting the unit of x. If NULL all units are allowed.

Details

The mode, prefix and unit values may be abbreviated.
The only quantity affected is the first (non-prefix) quantity in the quantity defintion.


Pisca46/quantities documentation built on May 31, 2019, 11:41 p.m.