-
All images in the vignette now have alt text.
-
Minor documentation improvements.
- Package now depends on R (>= 3.6.0).
-
New functions
date_start()
anddate_end()
for accessing the boundary elements of<grates>
objects. -
New function
%during%
for testing whether a scalar date is contained within the range (inclusive) of a<grates>
object.
- Users of the 3.5.0 release of ggplot2 will have noticed some additional "warnings" appearing within the plot. These have now been handled internally so please raise an issue if they reappear.
- Minor internal and non-breaking changes motivated by lintr.
- The scale functions (e.g.
scale_x_grates_isoweek()
) gain abreaks
argument to allow exact specification of breaks.
- Fix erroneous tests flagged by CRAN.
- No user facing changes.
For the first major release of grates a significant refactor has been undertaken that builds upon lessons learnt over the last two years. Whilst we have tried to limit breaking changes some functionality has been removed and some function parameters altered (see details below):
-
<grates_month>
objects are now always stored relative to the UNIX epoch. This is equivalent to settingorigin = 0
in the previous release. Calling the function with anorigin
argument will now error. -
Trying to create a
<grates_month>
object withn
set to 1 will now error. Uses are encouraged to use<grates_yearmonth>
for this case. -
<grates_int_period>
is now a defunct as it did not fit with the scope of the package (i.e grouped dates, not grouped integers). In particular theint_period()
,as_int_period()
andis_int_period()
will now error on use. -
The
origin
parameter from<grates_period>
as been renamed tooffset
to better reflect its usage. Users will need to update uses ofperiod()
,as_period()
andscale_x_grates_period()
to reflect this. -
as_yearweek()
no longer parsers character strings of the form "YYYY-Www" (e.g. "2020-W01"). -
Constructors
yearweek()
andisoweek()
andepiweek()
now allow construction of grates objects directly from year and week integer vectors.yearmonth()
andyearquarter()
constructors have been similarly changed to allow construction from year and month/quarter integer vectors. -
The old incarnation of direct constructors now begin with a
new_
prefix (e.g.new_month()
,new_yearweek()
,new_epiweek()
, ...). This is to distinguish them from more user friendly constructors that we have introduced (see above).
-
A new
yearmonth
class (<grates_yearmonth>
) and associated functions have been introduced. This object is similar to what was previously obtained via a call ofmonth(x, n = 1L, origin = 0L)
(now defunct - see above). -
New
isoweek
andepiweek
classes (<grates_isoweek>
and<grates_epiweek>
respectively) and associated functions. Internally these are similar to the corresponding<grates_yearweek>
objects but with a marginally more efficient implementation.
is.numeric()
methods for grates objects previously returned FALSE. Calls to these methods now dispatch to the default implementation based on the underlying type and should now return TRUE.
- Fix for changes made to POSIXlt objects in R-devel.
seq()
methods now implemented for all grates objects.
-
Conversion functions now preserve names.
-
Bug fixes for cast functions operating on objects of the same class but with different attributes.
-
This is a breaking release that changes the underlying implementations of the different grate constructors and associated scales for ggplot2. There has also been some renaming of function arguments to bring greater consistency across packages.
-
We now make more use of the high level API introduced by the clock package for working with R's date and date-time types.
- Fixed bug affecting
scale_x_period()
- Initial release