scales 1.0.0
New Features
Formatters
-
comma_format()
,percent_format()
andunit_format()
gain new arguments:
accuracy
,scale
,prefix
,suffix
,decimal.mark
,big.mark
(@larmarange, #146). -
dollar_format()
gains new arguments:accuracy
,scale
,decimal.mark
,
trim
(@larmarange, #148). -
New
number_bytes_format()
andnumber_bytes()
format numeric vectors into byte
measurements (@hrbrmstr, @dpseidel). -
New
number_format()
provides a generic formatter for numbers (@larmarange, #142). -
New
pvalue_format()
formats p-values (@larmarange, #145). -
ordinal_format()
gains new arguments:prefix
,suffix
,big.mark
,rules
;
rules for French and Spanish are also provided (@larmarange, #149). -
scientific_format()
gains new arguments:scale
,prefix
,suffix
,decimal.mark
,
trim
(@larmarange, #147). -
New
time_format()
formatsPOSIXt
andhms
objects (@dpseidel, #88).
Transformations & breaks
-
boxcox_trans()
is now invertible forx >= 0
and requires positive values.
A new argumentoffset
allows specification of both type-1 and type-2 Box-Cox
transformations (@dpseidel, #103). -
log_breaks()
returns integer multiples of integer powers of base when finer
breaks are needed (@ThierryO, #117). -
New function
modulus_trans()
implements the modulus transformation for positive
and negative values (@dpseidel). -
New
pseudo_log_trans()
for transforming numerics into a signed logarithmic scale
with a smooth transition to a linear scale around 0 (@lepennec, #106).
Minor bug fixes and improvements
-
scales functions now work as expected when it is used inside a for loop. In previous
package versions if a scales function was used with variable custom parameters
inside a for loop, some of the parameters were not evaluated until the end
of the loop, due to how R lazy evaluation works (@zeehio, #81). -
colour_ramp()
now usesalpha = TRUE
by default (@clauswilke, #108). -
date_breaks()
now supports subsecond intervals (@dpseidel, #85). -
Removes
dichromat
andplyr
dependencies.dichromat
is now suggested
(@dpseidel, #118). -
expand_range()
argumentsmul
andadd
now affect scales with a range of 0
(@dpseidel,
ggplot2-2281). -
extended_breaks()
now allows user specification of thelabeling::extended()
argumentonly.loose
to permit more flexible breaks specification
(@dpseidel, #99). -
New
rescale()
andrescale_mid()
methods supportdist
objects (@zeehio, #105). -
rescale_mid()
now properly handles NAs (@foo-bar-baz-qux, #104).