Published June 11, 2019
| Version v1.0.0
Software
Open
reconhub/aweek: aweek version 1.0.0
Description
This version is presented of aweek is presented as a more mature and stable version of aweek:
- combining objects is more predictable
- weeks/dates can be created from vectors with heterogeneous week_starts
- documentation is improved
- data frames can be created
change_week_start()allows the user to change theweek_startattribute of an aweek object, adjusting the weeks to match the new attribute accordingly.get_aweek()can generate aweek objects from a vector of week numbers. It has the ability to take into account different week start times.get_date()is similar toget_aweek(), but returns dates instead.as.aweek()allows users to create aweek object directly from characters with validation. It also allows for dates by passing todate2week().as.data.frame.aweek()is a new function that allows aweek objects to be directly incorporated into data frames.as.list.aweek()will now preserve the aweek structure in liststrunc.aweek()will truncate the day to the first day of the week.rep.aweek()allows repeating aweek characters.factor_aweek()allows the user to create aggregated aweek objects on the fly.
There are a couple of breaking changes coming to aweek that will improve stability by removing unclear coercion methods (see https://github.com/reconhub/aweek/issues/20).
- It is no longer possible to combine aweek objects if they do not share the
same
week_startattribute. This will result in an error informing the user to adjust theweek_startattribute with thechange_week_start()function. - Factors will no longer coerce factors when combining aweek objects.
- Using
date2week()withfactor = TRUEandfloor_day = FALSEnow throws an error instead of a warning (as prophesized in #13).
- The vignette has been updated to include an explanation of the underlying week calculation from date.
- The aweek class documentation has been updated to detail the different elements of the object and the calculations.
- Package documentation
package?aweekhas been added for an introduction.
- conversions will now retain the names of the object.
- More checks that weekdays and weeks are within the correct bounds have been added.
- as.Date.aweek has been simplified to no longer rely on regex since the aweek class is standard.
- The internal
get_wday()has been vastly simplified with improved speed.
Files
reconhub/aweek-v1.0.0.zip
Files
(142.4 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:aca37b49e44f12ccbc93531510a8097a
|
142.4 kB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/reconhub/aweek/tree/v1.0.0 (URL)