Skip to content

Releases: reconhub/aweek

aweek version 1.0.2

21 Mar 19:33
Compare
Choose a tag to compare

This is a maintenance release that fixed a failing test.

aweek version 1.0.0

11 Jun 15:21
Compare
Choose a tag to compare

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 the week_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 to get_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 to date2week().
  • 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 lists
  • trunc.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
    same week_start attribute. This will result in an error informing the user
    to adjust the week_start attribute with the change_week_start() function.
  • Factors will no longer coerce factors when combining aweek objects.
  • Using date2week() with factor = TRUE and floor_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

21 Jun 16:37
ce93c7d
Compare
Choose a tag to compare
Merge pull request #21 from reconhub/add-data-frame

Use strict behavior for aweek objects

aweek version 0.3.0

07 May 13:50
Compare
Choose a tag to compare

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

24 Apr 15:05
Compare
Choose a tag to compare

This release fixes a bug where NA dates were not properly processed (#12)

aweek version 0.2.0

09 Mar 11:02
Compare
Choose a tag to compare

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 where tz was not being passed was fixed.
  • date2week(): an error is now issued if users specify non-ISO 8601 dates OR
    don't specify a format 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

06 Mar 15:25
8d44d23
Compare
Choose a tag to compare

This is the initial CRAN version of aweek