Skip to content

Commit

Permalink
ready for cran release
Browse files Browse the repository at this point in the history
  • Loading branch information
earowang committed Feb 20, 2018
1 parent 49bcfea commit 4fb4700
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tsibble
Type: Package
Title: Tidy Temporal Data Frames and Tools
Version: 0.1.2.9999
Version: 0.1.3
Date: 2018-01-27
Authors@R: c(
person("Earo", "Wang", email = "[email protected]", role = c("aut", "cre")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tsibble 0.1.2.9999
# tsibble 0.1.3

## New functions

Expand Down
3 changes: 2 additions & 1 deletion R/tsummarise.R
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ tsum <- function(.data, first, remainder = NULL, FUN = summarise) {
}
if (is.null(remainder)) { # summarise_*()
nonkey <- setdiff(flatten_key(key(.data)), flat_grps)
grped_data <- select(grped_data, - !! nonkey)
sel_cols <- setdiff(names(grped_data), nonkey)
grped_data <- select(grped_data, !! sel_cols)
result <- FUN(grped_data)
} else { # summarise()
result <- FUN(grped_data, !!! remainder)
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ full_weather

### `tsummarise()` to summarise over calendar periods

`tsummarise()` and its scoped variants (including `_all()`, `_at()`, `_if()`) are introduced to aggregate interested variables over calendar periods. `tsummarise()` goes hand in hand with the index functions including `as.Date()`, `yearmonth()`, and `yearquarter()`, as well as other friends from *lubridate*, such as `year()` and `ceiling_date()`. For example, it would be of interest in computing average temperature and total precipitation per month, by applying `yearmonth()` to the hourly time index.
`tsummarise()` and its scoped variants (including `_all()`, `_at()`, `_if()`) are introduced to aggregate interested variables over calendar periods. `tsummarise()` goes hand in hand with the index functions including `as.Date()`, `yearmonth()`, and `yearquarter()`, as well as other friends from *lubridate*, such as `year()`, `ceiling_date()`, `floor_date()` and `round_date()`. For example, it would be of interest in computing average temperature and total precipitation per month, by applying `yearmonth()` to the hourly time index.

```{r tsummarise}
full_weather %>%
Expand All @@ -93,7 +93,7 @@ Temporal data often involves moving window calculations. Several functions in th

* `slide()`: sliding window with overlapping observations.
* `tile()`: tiling window without overlapping observations.
* `stretch()`: fixing an initial window and expanding more observations.
* `stretch()`: fixing an initial window and expanding to include more observations.

For example, a moving average of window size 3 is carried out on hourly temperatures for each group (*origin*).

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ preserves time zones for date-times.
`_if()`) are introduced to aggregate interested variables over calendar
periods. `tsummarise()` goes hand in hand with the index functions
including `as.Date()`, `yearmonth()`, and `yearquarter()`, as well as
other friends from *lubridate*, such as `year()` and `ceiling_date()`.
For example, it would be of interest in computing average temperature
and total precipitation per month, by applying `yearmonth()` to the
hourly time index.
other friends from *lubridate*, such as `year()`, `ceiling_date()`,
`floor_date()` and `round_date()`. For example, it would be of interest
in computing average temperature and total precipitation per month, by
applying `yearmonth()` to the hourly time index.

``` r
full_weather %>%
Expand Down Expand Up @@ -144,7 +144,7 @@ windows using purrr-like syntax:

- `slide()`: sliding window with overlapping observations.
- `tile()`: tiling window without overlapping observations.
- `stretch()`: fixing an initial window and expanding more
- `stretch()`: fixing an initial window and expanding to include more
observations.

For example, a moving average of window size 3 is carried out on hourly
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/tsummarise.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4fb4700

Please sign in to comment.