Releases: reconhub/aweek
aweek version 1.0.2
aweek version 1.0.0
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
NEW FUNCTIONS
change_week_start()
allows the user to change theweek_start
attribute 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.
BREAKING CHANGES
There are a couple of breaking changes coming to aweek that will improve
stability by removing unclear coercion methods
(see #20).
- It is no longer possible to combine aweek objects if they do not share the
sameweek_start
attribute. This will result in an error informing the user
to adjust theweek_start
attribute with thechange_week_start()
function. - Factors will no longer coerce factors when combining aweek objects.
- Using
date2week()
withfactor = TRUE
andfloor_day = FALSE
now throws an
error instead of a warning (as prophesized in #13).
DOCUMENTATION
- 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?aweek
has been added for an introduction.
BUG FIX
- conversions will now retain the names of the object.
MISC
- 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.
1.0.1
Merge pull request #21 from reconhub/add-data-frame Use strict behavior for aweek objects
aweek version 0.3.0
This version of aweek introduces the flexible global week_start
option, "aweek.week_start". This allows users to set the following line at the top of their scripts or in their .Rprofile to set the default start of the week:
aweek::set_week_start("Monday")
This is equivalent of setting options(aweek.week_start = 1L)
and will have the side effect of setting the default week_start option for both date2week()
and week2date()
, making it easier to maintain scripts using aweek.
aweek version 0.2.1
This release fixes a bug where NA dates were not properly processed (#12)
aweek version 0.2.0
This release fixes a test, allows subsetting and concatenation, and enforces stricter guidelines on character inputs.
- Subsetting and concatenating methods added to the
aweek
class (see #1) - Documentation divided into smaller chunks
as.POSIXlt()
bug wheretz
was not being passed was fixed.date2week()
: an error is now issued if users specify non-ISO 8601 dates OR
don't specify aformat
option. (found: @scottyaz, #2)- Best practices added to vignette
- Fix test that would fail every seven days on CRAN (see #5)
aweek version 0.1.0
This is the initial CRAN version of aweek