Skip to content

Releases: tidyverts/tsibble

tsibble 0.9.0

10 Jun 02:55
Compare
Choose a tag to compare

tsibble 0.9.0

This release uses the vctrs package internally in {tsibble}.

Breaking changes

  • The "interval" class has been formally defined as a record type under the vctrs framework. The new_interval() uses a new interface to create the interval and supports custom interval. Old tsibble objects will receive an error for "a corrupt tsibble".

New features

  • The .full argument in *_gaps supports two more options, start() and end(), for padding NA to either starting or ending time. (#147)
  • The argument n in new_data() and append_row() supports negative integer, appending past observations to the data. (#186)
  • New set of scale_[x/y/colour/size/alpha/fill]_year*() for custom ggplot2 scales.
  • Added pivot_longer() and pivot_wider() supporting methods for tsibble.
  • bind_rows() and bind_cols() are now possible for tsibble with dplyr v1.0.0.

Improvements

  • select() a tsibble now keeps both index and key by default. (#155)
  • Added tidyr::drop_na() support for tsibble. (#173)

Bug fixes

  • Fixed bug in as.ts.tbl_ts() for ignoring implicit missings. (#160)

Deprecated functions

  • Deprecated window functions in favour of the {slider} package. (#143)
  • Deprecated units_since() in favour of vec_cast().
  • Remove is.tsibble().
  • Defunct as.tsibble().

tsibble 0.8.3

29 Jul 23:03
Compare
Choose a tag to compare
  • Added lifecycle badges to functions.
  • index_by() supports lambda expression (#91).
  • Defunct argument gather in as_tsibble.mts() in favour of pivot_longer.
  • yearweek() handles characters containing keywords "W"/"Wk"/"Week", for example yearweek("2019 W03").

tsibble 0.8.2

14 Jun 03:33
Compare
Choose a tag to compare

This is a patch release.

  • Fixed bugs for losing the "ordered" attribute when renaming a tsibble, introduced in v0.8.1 (#126).
  • Fixed bug in as.ts.tbl_ts() for handling a tsibble of one row (#124).
  • Fixed issue of nest.tbl_ts() for naming (#123).
  • Fixed floating issues for duplicated indices in as_tsibble.ts() (#128).

tsibble 0.8.1

03 Jun 22:29
Compare
Choose a tag to compare
  • Breaking change: index_by(.data, <empty>) by default groups the index variable rather than previously ungroup().
  • Added new unnest_tsibble() to minimise the impact from the upcoming API changes in tidyr::unnest().
  • index_by() allows for grouping index variable; and group_by() will throw out an error for grouping index.
  • When creating a tsibble, a warning might be issued for mismatch between interval and index representation.
  • Fixed bugs in semi_join.tbl_ts() and anti_join.tbl_ts() without suffix (#122).
  • Deprecate as.tsibble() in favour of as_tsibble().
  • Defunct fill_na() in favour of fill_gaps().
  • Defunct pull_interval() in favour of interval_pull().

tsibble 0.8.0

28 Apr 13:07
Compare
Choose a tag to compare

Breaking changes

  • This release has undergone an overhaul to clean tsibble's meta data: (1) attribute regular integrated to interval, (2) attribute ordered integrated to index. A previously stored tsibble object may receive a warning "corrupt tsibble object".
  • The dplyr and tidyr generics are no longer re-exported. Instead they will be registered on load, which means you need to explicitly load library(tidyverse) in front.

Defunct & deprecated functions/arguments

  • Deprecate id() for creating key for the consistence of tidy selectors, and will be defunct until August 2019.
  • Deprecate of pull_interval() in favour of interval_pull().
  • Deprecate as.tsibble() in favour of as_tsibble(). The warning is displayed once per session.
  • Deprecate gather = TRUE in as_tsibble.ts() in favour of pivot_longer = TRUE.
  • Continue with deprecation of fill_na() in favour of fill_gaps(), and will be defunct in the next release.

Improvements

  • Support the interval of "quarter", "month", "week" & "day" for difftime.
  • Support the interval of "millisecond" & "microsecond" for hms.
  • Added new argument .drop for dropping empty factor or not in as_tsibble() and build_tsibble().
  • Binary - operator between yearweek, yearmonth, and yearquarter returns class difftime.
  • Added new argument key_data to build_tsibble() for the easy-to-reason purpose.
  • yearquarter() better supports strings that contains "Q"/"Qtr"/"Quarter". (#107)

Bug fixes

  • Fixed bugs in as_tsibble.ts() for monthly series starting at other months than January. (#89)
  • guess_frequency.yearweek() returns 52.18 for more accurate weekly representation, instead of 52.
  • n() now can be called in slice.tbl_ts(). (#95)
  • Fixed false warnings for negative indices in slice.tbl_ts().
  • Fixed false warnings for a few cases in arrange.tbl_ts().
  • Fixed *_join() for not finding key or index when by is specified. (#102)
  • Added "Tasmania" to data(tourism) and 2017 data.
  • More robustly handles sub-second intervals.

tsibble 0.6.0

27 Nov 11:00
Compare
Choose a tag to compare

This release simplifies the "key" structure. The nesting and crossing definition has been removed from the "key" specification. One or more variables forming the "key", are required to identify observational units over time, but no longer assume the relationship between these variables. The nesting and crossing structure will be dealt with visualisation and forecasting reconciliation in downstream packages.

Breaking changes

  • count_gaps.tbl_ts() returns a tibble containing gaps for each key value rather than an overall gap, which is consistent with the rest of tsibble methods. And all output column names that are not supplied by users gain a prefixed ".".
  • time_unit() accepts interval input instead of time vectors to avoid overheads, also marked as internal function.
  • Separate partial sliding from slider() and pslider() as new functions partial_slider() and partial_pslider(). Argument .partial is removed from slider() and pslider() to feature a simpler interface.
  • Removed argument group from build_tsibble(). In order to construct a grouped tsibble, x requires a grouped df.

New features

  • Added S3 generic has_gaps() to quickly check if there are implicit time gaps for each key in a tsibble.
  • Added S3 generic new_data() to produce the future of a tsibble.
  • A shorthand filter_index() to filter time window for a tsibble.
  • New S3 generic time_in() to check if time falls in the ranges in compact expression, with no need for time zone specification.
  • An empty tsibble is now valid and will not raise an error, which makes it easier to programme with.
  • New vignettes on handling implicit missingness and FAQ.
  • new_tsibble() creates a subclass of a tsibble.
  • Renamed fill_na() to fill_gaps(), for more expressive function name and consistency to has_gaps() and count_gaps(). Soft-deprecated fill_na(). (#71)
  • Added is_duplicated(), are_duplicated() and duplicates().
  • If POSIXct, time zone will be displayed in the header via print().
  • Added index support for ordered factors.

Bug fixes

  • Fixed unexpected error message for holiday_aus() that requires package "timeDate".
  • Fixed summarise.tbl_ts(), select.tbl_ts() & fill_na.tbl_ts() scoping issue (#67).
  • slice.tbl_ts() correctly handles logical NA.
  • fill_na() will only replace implicit time gaps by values and functions, and leave originally explicit NA intact.
  • tidyr::fill() gained support for class "grouped_ts", and it is re-exported again. (#73)

Misc

  • Soft-deprecated fill_na(), in favour of fill_gaps().
  • Soft-deprecated find_duplicates(), in favour of are_duplicated().
  • Deprecated case_na(), and will be defunct in next release.
  • Deprecated split_by(), which is under development as S3 generic in dplyr.
  • Soft-deprecated as.tsibble(), following as.tibble() in tibble.
  • Deprecated .drop argument in column-wise verbs, and suggested to use as_tibble().
  • If select() doesn't select index, it will inform users and automatically select it.

tsibble 0.5.3

10 Oct 19:38
Compare
Choose a tag to compare

New features

  • Added append_row() for easily appending new observations to a tsibble. (#59)
  • Nesting structure can be specified using /, consistent with lm. (#64)

Bug fixes

  • Fixed warning in fill_na() for multiple replacements when using with group_by(), introduced in v0.5.1.
  • as_tsibble.grouped_df() respected its existing groups and removed argument group. (#60)
  • Preserve the ordering of key specification in select.tbl_ts(). (#63)

Misc

  • Soft-deprecated case_na() & split_by().

tsibble v0.5.2

11 Sep 16:16
Compare
Choose a tag to compare

Bug fixes

  • unnest.lst_ts respects the ordering of "key" values. (#56)
  • split_by() and nest.tbl_ts() respect the appearance ordering of input variables. (#57)
  • group_indices.tbl_ts() and key_indices() return consistent formats as its generic.
  • Argument key no longer accepted character.

Improvements

  • Slightly faster nest.tbl_ts().
  • index_by() gives more informative error when LHS is named as index.

Changes catering for the updates in tibble

  • No longer reexported as.tibble().
  • Reexported tibble().

tsibble v0.5.1

20 Aug 14:13
Compare
Choose a tag to compare

New features

  • tile() gained a new argument .bind = FALSE.
  • Vectorised arithmetic operators (+ & -) for yearweek, yearmonth, and yearquarter.
  • new_interval() creates an "interval" object with the specified values.

Improvements

  • Faster performance in fill_na() for replacing values when group_by().
  • Speed improvement when subsetting yearweek, yearmonth and yearquarter using [.

Bug fixes

  • Fixed key updating via group_by() + summarise(). (#47)
  • Respected the ordering of input variables while creating the key.
  • Fixed "attempt to select less than one element in integerOneIndex" error message in unnest.lst_ts().
  • Fixed incorrect interval when doing join operations for custom index class. (#52)
  • Avoided warnings when character input for key and value in gather.tbl_ts(). (#54)

Misc

  • slide() & stretch() use the same coercion rules as dplyr::combine() now, if .bind = TRUE.
  • Avoid strong dependency on pillar.
  • Setting row names on a tsibble is deprecated, which is consistent with tibble.

tsibble v0.5.0

05 Aug 20:25
Compare
Choose a tag to compare

This release introduced the breaking changes to the "interval" class to make tsibble better support finer time resolution (e.g. millisecond, microsecond, and nanosecond). The "interval" format changes from upper case to short hand. To support new time index class, only index_valid() and pull_interval() need to be defined now.

New features

  • Added "nanotime" support for nanoseconds.
  • Added scoped variant group_by_key() to easily group the key variables.
  • slide() gained a new argument .align = "right" to align at "right", "center", or "left". If window size is even for center alignment, either "center-right" or "center-left" is needed.
  • Defined arithmetic operators (+ & -) for yearweek, yearmonth, and yearquarter.
  • slide() and stretch() gained a new argument .bind = FALSE.

Improvements

  • Speed improvement for internals when it's a known valid tsibble. (#43)
  • Better support "millisecond" and "microsecond".
  • A new vignette on window functions.

Internal changes

  • Replaced NA or NULL with 0 in the "interval" class to make the representation simpler.
  • The interval class has new slots of "millisecond", "microsecond", "nanosecond".
  • time_unit() is a function instead of S3 generic, and made index extension a bit easier.

Bug fixes

  • Fixed warning in format.yearweek().
  • Fixed group_by.lst_ts() for dropping the grouping information.
  • Fixed stretch2() only applying .f to one input.
  • Fixed NSE in as_tsibble.grouped_df() for groups. (#44)
  • Fixed bug in .fill = NULL for slide().

Misc

  • Moved package "timeDate" from Imports to Suggests.
  • Added "anytime" to Imports for better parsing characters.