Releases: tidyverts/tsibble
tsibble 0.9.0
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()
andend()
, for paddingNA
to either starting or ending time. (#147) - The argument
n
innew_data()
andappend_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()
andpivot_wider()
supporting methods for tsibble. bind_rows()
andbind_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 ofvec_cast()
. - Remove
is.tsibble()
. - Defunct
as.tsibble()
.
tsibble 0.8.3
- Added lifecycle badges to functions.
index_by()
supports lambda expression (#91).- Defunct argument
gather
inas_tsibble.mts()
in favour ofpivot_longer
. yearweek()
handles characters containing keywords "W"/"Wk"/"Week", for exampleyearweek("2019 W03")
.
tsibble 0.8.2
This is a patch release.
tsibble 0.8.1
- Breaking change:
index_by(.data, <empty>)
by default groups the index variable rather than previouslyungroup()
. - Added new
unnest_tsibble()
to minimise the impact from the upcoming API changes intidyr::unnest()
. index_by()
allows for grouping index variable; andgroup_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()
andanti_join.tbl_ts()
without suffix (#122). - Deprecate
as.tsibble()
in favour ofas_tsibble()
. - Defunct
fill_na()
in favour offill_gaps()
. - Defunct
pull_interval()
in favour ofinterval_pull()
.
tsibble 0.8.0
Breaking changes
- This release has undergone an overhaul to clean tsibble's meta data: (1) attribute
regular
integrated tointerval
, (2) attributeordered
integrated toindex
. 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 ofinterval_pull()
. - Deprecate
as.tsibble()
in favour ofas_tsibble()
. The warning is displayed once per session. - Deprecate
gather = TRUE
inas_tsibble.ts()
in favour ofpivot_longer = TRUE
. - Continue with deprecation of
fill_na()
in favour offill_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 inas_tsibble()
andbuild_tsibble()
. - Binary
-
operator between yearweek, yearmonth, and yearquarter returns classdifftime
. - Added new argument
key_data
tobuild_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 inslice.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 whenby
is specified. (#102) - Added "Tasmania" to
data(tourism)
and 2017 data. - More robustly handles sub-second intervals.
tsibble 0.6.0
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()
acceptsinterval
input instead of time vectors to avoid overheads, also marked as internal function.- Separate partial sliding from
slider()
andpslider()
as new functionspartial_slider()
andpartial_pslider()
. Argument.partial
is removed fromslider()
andpslider()
to feature a simpler interface. - Removed argument
group
frombuild_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()
tofill_gaps()
, for more expressive function name and consistency tohas_gaps()
andcount_gaps()
. Soft-deprecatedfill_na()
. (#71) - Added
is_duplicated()
,are_duplicated()
andduplicates()
. - If
POSIXct
, time zone will be displayed in the header viaprint()
. - 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 logicalNA
.fill_na()
will only replace implicit time gaps by values and functions, and leave originally explicitNA
intact.tidyr::fill()
gained support for class "grouped_ts", and it is re-exported again. (#73)
Misc
- Soft-deprecated
fill_na()
, in favour offill_gaps()
. - Soft-deprecated
find_duplicates()
, in favour ofare_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()
, followingas.tibble()
in tibble. - Deprecated
.drop
argument in column-wise verbs, and suggested to useas_tibble()
. - If
select()
doesn't select index, it will inform users and automatically select it.
tsibble 0.5.3
New features
- Added
append_row()
for easily appending new observations to a tsibble. (#59) - Nesting structure can be specified using
/
, consistent withlm
. (#64)
Bug fixes
- Fixed warning in
fill_na()
for multiple replacements when using withgroup_by()
, introduced in v0.5.1. as_tsibble.grouped_df()
respected its existing groups and removed argumentgroup
. (#60)- Preserve the ordering of key specification in
select.tbl_ts()
. (#63)
Misc
- Soft-deprecated
case_na()
&split_by()
.
tsibble v0.5.2
Bug fixes
unnest.lst_ts
respects the ordering of "key" values. (#56)split_by()
andnest.tbl_ts()
respect the appearance ordering of input variables. (#57)group_indices.tbl_ts()
andkey_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
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 whengroup_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 asdplyr::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
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()
andstretch()
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
orNULL
with0
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
forslide()
.
Misc
- Moved package "timeDate" from Imports to Suggests.
- Added "anytime" to Imports for better parsing characters.