Skip to content

Commit ab1768d

Browse files
committed
clean help index page
1 parent ea92009 commit ab1768d

30 files changed

+66
-95
lines changed

R/as-tsibble.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ as_tsibble.tbl_df <- function(x, key = NULL, index, regular = TRUE,
139139
)
140140
}
141141

142-
#' @rdname as-tsibble
142+
#' @keywords internal
143143
#' @export
144144
as_tsibble.data.frame <- as_tsibble.tbl_df
145145

@@ -486,7 +486,6 @@ format.tbl_ts <- function(x, ..., n = NULL, width = NULL, n_extra = NULL) {
486486
#'
487487
#' @param x A `tbl_ts`.
488488
#' @param ... Ignored.
489-
#' @inheritParams base::as.data.frame
490489
#'
491490
#' @rdname as-tibble
492491
#' @export
@@ -505,7 +504,7 @@ as_tibble.grouped_df <- function(x, ...) {
505504
x
506505
}
507506

508-
#' @rdname as-tibble
507+
#' @keywords internal
509508
#' @export
510509
as.data.frame.tbl_ts <- function(x, row.names = NULL, optional = FALSE, ...) {
511510
new_data_frame(vec_data(x), n = nrow(x))

R/deprec-slide.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ bad_step_function <- function(.step) {
7474
#' If `.x` is a list of data frames, row binding is carried out.
7575
#'
7676
#' @return if `.fill != NULL`, it always returns the same length as input.
77+
#' @keywords internal
7778
#' @rdname slide
7879
#' @export
7980
#' @family sliding window functions
@@ -166,6 +167,7 @@ slide_dfc <- function(.x, .f, ..., .size = 1, .step = 1, .fill = NA,
166167
#' @param .x,.y Objects to slide over simultaneously.
167168
#' @inheritParams slide
168169
#'
170+
#' @keywords internal
169171
#' @rdname slide2
170172
#' @export
171173
#' @family sliding window functions
@@ -356,6 +358,7 @@ pslide_dfc <- function(.l, .f, ..., .size = 1, .step = 1, .fill = NA,
356358
#' @param .bind If `.x` is a list or data frame, the input will be flattened
357359
#' to a list of data frames.
358360
#' @inheritParams slide
361+
#' @keywords internal
359362
#' @rdname slider
360363
#' @seealso [partial_slider], [partial_pslider] for partial sliding
361364
#' @export
@@ -404,6 +407,7 @@ pslider <- function(..., .size = 1, .step = 1, .bind = FALSE) {
404407
#' Partially splits the input to a list according to the rolling window size.
405408
#'
406409
#' @inheritParams slide
410+
#' @keywords internal
407411
#' @rdname partial-slider
408412
#' @export
409413
#' @examples
@@ -448,8 +452,7 @@ partial_pslider <- function(..., .size = 1, .step = 1, .fill = NA,
448452
#' They all return a tsibble including a new column `.id` as part of the key. The
449453
#' output dimension will increase considerably with `slide_tsibble()` and
450454
#' `stretch_tsibble()`, which is likely to run out of memory when the data is
451-
#' large. Alternatively, you could construct cross validation using `pslide()`
452-
#' and `pstretch()` to avoid the memory issue.
455+
#' large.
453456
#' @family rolling tsibble
454457
#' @export
455458
#' @examples
@@ -642,6 +645,7 @@ slider_msg <- function() {
642645
#' @details
643646
#' It requires the package **furrr** to be installed. Please refer to [furrr](https://davisvaughan.github.io/furrr/) for performance and detailed usage.
644647
#' @evalRd {suffix <- c("lgl", "chr", "int", "dbl", "dfr", "dfc"); c(paste0('\\alias{future_', c("slide", "slide2", "pslide"), '}'), paste0('\\alias{future_slide_', suffix, '}'), paste0('\\alias{future_slide2_', suffix, '}'), paste0('\\alias{future_pslide_', suffix, '}'))}
648+
#' @keywords internal
645649
#' @name future_slide()
646650
#' @rdname future-slide
647651
#' @exportPattern ^future_

R/deprec-stretch.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ nrow2 <- function(.x) {
2121
#' @param .step A positive integer for incremental step.
2222
#'
2323
#' @return if `.fill != NULL`, it always returns the same length as input.
24+
#' @keywords internal
2425
#' @rdname stretch
2526
#' @export
2627
#' @family stretching window functions
@@ -91,6 +92,7 @@ stretch_dfc <- function(.x, .f, ..., .step = 1, .init = 1, .fill = NA,
9192
#' @inheritParams slide2
9293
#' @inheritParams stretch
9394
#'
95+
#' @keywords internal
9496
#' @rdname stretch2
9597
#' @export
9698
#' @family stretching window functions
@@ -218,6 +220,7 @@ pstretch_dfc <- function(.l, .f, ..., .step = 1, .init = 1, .fill = NA,
218220
#' @param .x An objects to be split.
219221
#' @param ... Multiple objects to be split in parallel.
220222
#' @inheritParams stretch
223+
#' @keywords internal
221224
#' @rdname stretcher
222225
#' @export
223226
#' @examples
@@ -338,6 +341,7 @@ incr <- function(.init, .step) {
338341
#' future specific options to use with the workers.
339342
#'
340343
#' @evalRd {suffix <- c("lgl", "chr", "int", "dbl", "dfr", "dfc"); c(paste0('\\alias{future_', c("stretch", "stretch2", "pstretch"), '}'), paste0('\\alias{future_stretch_', suffix, '}'), paste0('\\alias{future_stretch2_', suffix, '}'), paste0('\\alias{future_pstretch_', suffix, '}'))}
344+
#' @keywords internal
341345
#' @name future_stretch()
342346
#' @rdname future-stretch
343347
#' @exportPattern ^future_

R/deprec-tile.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#'
1414
#' @inheritParams slide
1515
#'
16+
#' @keywords internal
1617
#' @rdname tile
1718
#' @export
1819
#' @family tiling window functions
@@ -71,6 +72,7 @@ tile_dfc <- function(.x, .f, ..., .size = 1, .bind = FALSE) {
7172
#' * `tile2_dfr()` `tile2_dfc()` return data frames using row-binding & column-binding.
7273
#'
7374
#' @inheritParams slide2
75+
#' @keywords internal
7476
#' @rdname tile2
7577
#' @export
7678
#' @family tiling window functions
@@ -150,6 +152,7 @@ ptile_dfc <- function(.l, .f, ..., .size = 1, .bind = FALSE) {
150152
#' Splits the input to a list according to the tiling window size.
151153
#'
152154
#' @inheritParams slider
155+
#' @keywords internal
153156
#' @rdname tiler
154157
#' @export
155158
#' @examples
@@ -227,6 +230,7 @@ tile_tsibble <- function(.x, .size = 1, .id = ".id") {
227230
#' future specific options to use with the workers.
228231
#'
229232
#' @evalRd {suffix <- c("lgl", "chr", "int", "dbl", "dfr", "dfc"); c(paste0('\\alias{future_', c("tile", "tile2", "ptile"), '}'), paste0('\\alias{future_tile_', suffix, '}'), paste0('\\alias{future_tile2_', suffix, '}'), paste0('\\alias{future_ptile_', suffix, '}'))}
233+
#' @keywords internal
230234
#' @name future_tile()
231235
#' @rdname future-tile
232236
#' @exportPattern ^future_

R/dplyr-verbs.R

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,34 @@
2929
#' Joining with other data sources triggers the check on the validity of the
3030
#' resulting tsibble.
3131
#'
32-
#' @param .data,data A `tbl_ts`.
33-
#' @param ... Same arguments accepted as its tidyverse generic.
34-
#' @inheritParams dplyr::filter
35-
#' @param .groups See [dplyr::summarise()]
36-
#'
32+
#' @usage NULL
3733
#' @name tsibble-tidyverse
34+
#' @examples
35+
#' library(dplyr, warn.conflicts = FALSE)
36+
#' # Sum over sensors
37+
#' pedestrian %>%
38+
#' index_by() %>%
39+
#' summarise(Total = sum(Count))
40+
#' # shortcut
41+
#' pedestrian %>%
42+
#' summarise(Total = sum(Count))
43+
#' # Back to tibble
44+
#' pedestrian %>%
45+
#' as_tibble() %>%
46+
#' summarise(Total = sum(Count))
47+
#'
48+
#' library(tidyr)
49+
#' # reshaping examples from tidyr
50+
#' stocks <- tsibble(
51+
#' time = as.Date("2009-01-01") + 0:9,
52+
#' X = rnorm(10, 0, 1),
53+
#' Y = rnorm(10, 0, 2),
54+
#' Z = rnorm(10, 0, 4)
55+
#' )
56+
#' (stocksm <- stocks %>%
57+
#' pivot_longer(-time, names_to = "stock", values_to = "price"))
58+
#' stocksm %>%
59+
#' pivot_wider(names_from = stock, values_from = price)
3860
NULL
3961

4062
#' @export
@@ -57,7 +79,6 @@ select.tbl_ts <- function(.data, ...) {
5779
#' @export
5880
select.grouped_ts <- select.tbl_ts
5981

60-
#' @rdname tsibble-tidyverse
6182
#' @export
6283
transmute.tbl_ts <- function(.data, ...) {
6384
bind_tsibble(NextMethod(), .data, position = "before")
@@ -66,20 +87,6 @@ transmute.tbl_ts <- function(.data, ...) {
6687
#' @export
6788
transmute.grouped_ts <- transmute.tbl_ts
6889

69-
#' @rdname tsibble-tidyverse
70-
#' @examples
71-
#' library(dplyr, warn.conflicts = FALSE)
72-
#' # Sum over sensors
73-
#' pedestrian %>%
74-
#' index_by() %>%
75-
#' summarise(Total = sum(Count))
76-
#' # shortcut
77-
#' pedestrian %>%
78-
#' summarise(Total = sum(Count))
79-
#' # Back to tibble
80-
#' pedestrian %>%
81-
#' as_tibble() %>%
82-
#' summarise(Total = sum(Count))
8390
#' @export
8491
summarise.tbl_ts <- function(.data, ..., .groups = NULL) {
8592
# Unlike summarise.grouped_df(), summarise.tbl_ts() doesn't compute values for

R/scales.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#' @param ... Arguments passed to [`ggplot2::scale_x_date()`].
77
#'
88
#' @return A ggproto object inheriting from `Scale`
9+
#' @keywords internal
910
#'
1011
#' @name tsibble-scales
1112
NULL
@@ -129,6 +130,7 @@ scale_colour_yearmonth <- function(...) {
129130
#' @export
130131
scale_color_yearmonth <- scale_colour_yearmonth
131132

133+
#' @keywords internal
132134
#' @rdname tsibble-scales
133135
#' @export
134136
scale_alpha_yearmonth <- function(...) {

R/tidyr-verbs.R

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
globalVariables(c("name"))
22

3-
#' @rdname tsibble-tidyverse
4-
#' @usage NULL
5-
#' @examples
6-
#' library(tidyr)
7-
#' # reshaping examples from tidyr
8-
#' stocks <- tsibble(
9-
#' time = as.Date("2009-01-01") + 0:9,
10-
#' X = rnorm(10, 0, 1),
11-
#' Y = rnorm(10, 0, 2),
12-
#' Z = rnorm(10, 0, 4)
13-
#' )
14-
#' (stocksm <- stocks %>%
15-
#' pivot_longer(-time, names_to = "stock", values_to = "price"))
16-
#' stocksm %>%
17-
#' pivot_wider(names_from = stock, values_from = price)
183
pivot_longer.tbl_ts <- function(data, cols, names_to = "name", ...) {
194
if (!has_length(names_to)) {
205
abort("`pivot_longer(<tsibble>)` can't accept zero-length `names_to`.")

R/ts2tsibble.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ as_tsibble.msts <- function(x, ..., tz = "UTC", pivot_longer = TRUE) {
9999
}
100100
}
101101

102-
#' @rdname as-tsibble
103-
#' @usage NULL
102+
#' @keywords internal
104103
#' @export
105104
as_tsibble.hts <- function(x, ..., tz = "UTC") {
106105
full_labs <- extract_labels(x)

R/yearweek.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ is_53weeks <- function(year) {
309309
p_year(year) == 4 | p_year(pre_year) == 3
310310
}
311311

312-
#' @rdname year-week
313312
#' @export
314313
year.yearweek <- function(x) {
315314
x <- as_date(x)

man/as-tibble.Rd

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)