diff --git a/.Rbuildignore b/.Rbuildignore index 06980339..a330f6f6 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,6 +8,7 @@ ^codecov\.yml$ ^docs$ ^_pkgdown\.yml$ +^pkgdown$ ^cran-comments\.md$ ^\.github$ ^revdep$ diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 00000000..14159b77 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,50 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml deleted file mode 100644 index 4f9f8cbf..00000000 --- a/.github/workflows/check-standard.yaml +++ /dev/null @@ -1,64 +0,0 @@ -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: R-CMD-check - -jobs: - R-CMD-check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: macOS-latest, r: 'release'} - - - {os: windows-latest, r: 'release'} - # Use 3.6 to trigger usage of RTools35 - # - {os: windows-latest, r: '3.6'} - - # Use older ubuntu to maximise backward compatibility - - {os: ubuntu-20.04, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-20.04, r: 'release'} - - {os: ubuntu-20.04, r: 'oldrel-1'} - - {os: ubuntu-20.04, r: 'oldrel-2'} - - {os: ubuntu-20.04, r: 'oldrel-3'} - # - {os: ubuntu-20.04, r: 'oldrel-4'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-pandoc@v1 - - - uses: r-lib/actions/setup-r@v1 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v1 - with: - extra-packages: rcmdcheck - - - uses: r-lib/actions/check-r-package@v1 - - - name: Show testthat output - if: always() - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 7b436c6e..a7276e85 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,23 +1,32 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: branches: [main, master] - tags: ['*'] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: name: pkgdown jobs: pkgdown: runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true @@ -26,8 +35,14 @@ jobs: extra-packages: any::pkgdown, local::. needs: website - - name: Deploy package - run: | - git config --local user.name "$GITHUB_ACTOR" - git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml index 51040eae..eea58c5c 100644 --- a/.github/workflows/pr-commands.yaml +++ b/.github/workflows/pr-commands.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: issue_comment: @@ -8,28 +8,30 @@ name: Commands jobs: document: - if: startsWith(github.event.comment.body, '/document') + if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }} name: document runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/pr-fetch@v1 + - uses: r-lib/actions/pr-fetch@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: roxygen2 + extra-packages: any::roxygen2 + needs: pr-document - name: Document - run: Rscript -e 'roxygen2::roxygenise()' + run: roxygen2::roxygenise() + shell: Rscript {0} - name: commit run: | @@ -37,30 +39,33 @@ jobs: git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" git add man/\* NAMESPACE git commit -m 'Document' - - uses: r-lib/actions/pr-push@v1 + + - uses: r-lib/actions/pr-push@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} style: - if: startsWith(github.event.comment.body, '/style') + if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }} name: style runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/pr-fetch@v1 + - uses: r-lib/actions/pr-fetch@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 - name: Install dependencies - run: Rscript -e 'install.packages("styler")' + run: install.packages("styler") + shell: Rscript {0} - name: Style - run: Rscript -e 'styler::style_pkg()' + run: styler::style_pkg() + shell: Rscript {0} - name: commit run: | @@ -68,6 +73,7 @@ jobs: git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" git add \*.R git commit -m 'Style' - - uses: r-lib/actions/pr-push@v1 + + - uses: r-lib/actions/pr-push@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 3c0da1c9..21b8a933 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: @@ -15,16 +15,36 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: covr + extra-packages: any::covr + needs: coverage - name: Test coverage - run: covr::codecov() + run: | + covr::codecov( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + ) shell: Rscript {0} + + - name: Show testthat output + if: always() + run: | + ## -------------------------------------------------------------------- + find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: coverage-test-failures + path: ${{ runner.temp }}/package diff --git a/DESCRIPTION b/DESCRIPTION index b74cf5e4..0ced9e34 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -63,12 +63,10 @@ Suggests: timeDate VignetteBuilder: knitr -RdMacros: - lifecycle ByteCompile: true Config/testthat/edition: 3 Encoding: UTF-8 Language: en-GB LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/NAMESPACE b/NAMESPACE index 590404aa..3955a5b4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -15,6 +15,8 @@ S3method(arrange,grouped_ts) S3method(arrange,tbl_ts) S3method(as.data.frame,tbl_ts) S3method(as.ts,tbl_ts) +S3method(as_tibble,grouped_df) +S3method(as_tibble,grouped_ts) S3method(as_tibble,tbl_ts) S3method(as_tsibble,"NULL") S3method(as_tsibble,data.frame) @@ -35,6 +37,15 @@ S3method(dplyr_reconstruct,grouped_ts) S3method(dplyr_reconstruct,tbl_ts) S3method(dplyr_row_slice,grouped_ts) S3method(dplyr_row_slice,tbl_ts) +S3method(end_window,Date) +S3method(end_window,POSIXct) +S3method(end_window,difftime) +S3method(end_window,numeric) +S3method(end_window,yearmon) +S3method(end_window,yearmonth) +S3method(end_window,yearqtr) +S3method(end_window,yearquarter) +S3method(end_window,yearweek) S3method(fill_gaps,data.frame) S3method(fill_gaps,tbl_ts) S3method(format,interval) @@ -104,16 +115,32 @@ S3method(rbind,tbl_ts) S3method(scan_gaps,tbl_ts) S3method(select,grouped_ts) S3method(select,tbl_ts) +S3method(seq,ordered) S3method(seq,yearmonth) S3method(seq,yearquarter) S3method(seq,yearweek) S3method(setdiff,yearmonth) S3method(setdiff,yearquarter) S3method(setdiff,yearweek) +S3method(start_window,Date) +S3method(start_window,POSIXct) +S3method(start_window,difftime) +S3method(start_window,numeric) +S3method(start_window,yearmon) +S3method(start_window,yearmonth) +S3method(start_window,yearqtr) +S3method(start_window,yearquarter) +S3method(start_window,yearweek) S3method(summarise,grouped_ts) S3method(summarise,tbl_ts) S3method(tbl_sum,grouped_ts) S3method(tbl_sum,tbl_ts) +S3method(time_ts,Date) +S3method(time_ts,POSIXt) +S3method(time_ts,numeric) +S3method(time_ts,yearmonth) +S3method(time_ts,yearquarter) +S3method(time_ts,yearweek) S3method(transmute,grouped_ts) S3method(transmute,tbl_ts) S3method(type_sum,tbl_ts) @@ -371,6 +398,7 @@ importFrom(dplyr,with_order) importFrom(generics,intersect) importFrom(generics,setdiff) importFrom(generics,union) +importFrom(lifecycle,deprecated) importFrom(lubridate,"month<-") importFrom(lubridate,as.duration) importFrom(lubridate,as.period) diff --git a/R/as-tsibble.R b/R/as-tsibble.R index 5128c709..83babbe9 100644 --- a/R/as-tsibble.R +++ b/R/as-tsibble.R @@ -4,7 +4,7 @@ setOldClass(c("tbl_ts", "tbl_df", "tbl", "data.frame")) #' Create a tsibble object #' -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' @param ... A set of name-value pairs. #' @param key Variable(s) that uniquely determine time indices. `NULL` for @@ -71,7 +71,7 @@ tsibble <- function(..., key = NULL, index, regular = TRUE, .drop = TRUE) { #' Coerce to a tsibble object #' -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' @param x Other objects to be coerced to a tsibble (`tbl_ts`). #' @inheritParams tsibble @@ -317,7 +317,7 @@ build_tsibble <- function(x, key = NULL, key_data = NULL, index, index2 = index, #' Low-level & high-performance constructor for a tsibble object #' #' @description -#' \lifecycle{experimental} +#' `r lifecycle::badge('experimental')` #' #' `build_tsibble_meta()` does much less checks than `build_tsibble()` for #' high performance. @@ -500,15 +500,16 @@ as_tibble.tbl_ts <- function(x, ...) { new_tibble(vec_data(x), nrow = nrow(x)) } +#' @export as_tibble.grouped_ts <- function(x, ...) { new_grouped_df(x, groups = group_data(x)) } +#' @export as_tibble.grouped_df <- function(x, ...) { x } -#' @keywords internal #' @export as.data.frame.tbl_ts <- function(x, row.names = NULL, optional = FALSE, ...) { new_data_frame(vec_data(x)) @@ -517,7 +518,7 @@ as.data.frame.tbl_ts <- function(x, row.names = NULL, optional = FALSE, ...) { #' Test duplicated observations determined by key and index variables #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' * `is_duplicated()`: a logical scalar if the data exist duplicated observations. #' * `are_duplicated()`: a logical vector, the same length as the row number of `data`. diff --git a/R/dplyr-verbs.R b/R/dplyr-verbs.R index b567006e..8aedf77b 100644 --- a/R/dplyr-verbs.R +++ b/R/dplyr-verbs.R @@ -166,7 +166,7 @@ group_by.tbl_ts <- function(.data, ..., .add = FALSE, #' Group by key variables #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' @param .data A `tbl_ts` object. #' @param ... Ignored. diff --git a/R/filter-index.R b/R/filter-index.R index d1d62997..ac411957 100644 --- a/R/filter-index.R +++ b/R/filter-index.R @@ -117,6 +117,7 @@ end_window <- function(x, y = NULL, ...) { UseMethod("end_window") } +#' @export start_window.numeric <- function(x, y = NULL, ...) { if (is_null(y)) { min(x) @@ -125,6 +126,7 @@ start_window.numeric <- function(x, y = NULL, ...) { } } +#' @export end_window.numeric <- function(x, y = NULL, ...) { if (is_null(y)) { max(x) + 1 @@ -133,6 +135,7 @@ end_window.numeric <- function(x, y = NULL, ...) { } } +#' @export start_window.difftime <- function(x, y = NULL, ...) { if (!requireNamespace("hms", quietly = TRUE)) { abort("Package `hms` required.\nPlease install and try again.") @@ -145,6 +148,7 @@ start_window.difftime <- function(x, y = NULL, ...) { } } +#' @export end_window.difftime <- function(x, y = NULL, ...) { if (is_null(y)) { hms::as_hms(max(x) + 1) @@ -155,6 +159,7 @@ end_window.difftime <- function(x, y = NULL, ...) { } } +#' @export start_window.Date <- function(x, y = NULL, ...) { if (is_null(y)) { min(x) @@ -167,6 +172,7 @@ start_window.Date <- function(x, y = NULL, ...) { } } +#' @export end_window.Date <- function(x, y = NULL, ...) { if (is_null(y)) { max(x) + period(1, "day") @@ -193,6 +199,7 @@ end_window.Date <- function(x, y = NULL, ...) { } } +#' @export start_window.POSIXct <- function(x, y = NULL, ...) { if (is_null(y)) { min(x) @@ -204,6 +211,7 @@ start_window.POSIXct <- function(x, y = NULL, ...) { } } +#' @export end_window.POSIXct <- function(x, y = NULL, ...) { if (is_null(y)) { max(x) + period(1, "second") @@ -234,6 +242,7 @@ end_window.POSIXct <- function(x, y = NULL, ...) { } } +#' @export start_window.yearweek <- function(x, y = NULL, ...) { wk_start <- week_start(x) x <- as_date(x) @@ -244,6 +253,7 @@ start_window.yearweek <- function(x, y = NULL, ...) { yearweek(start_window(x = x, y = y), week_start = wk_start) } +#' @export end_window.yearweek <- function(x, y = NULL, ...) { wk_start <- week_start(x) x <- as_date(x) @@ -254,6 +264,7 @@ end_window.yearweek <- function(x, y = NULL, ...) { yearweek(end_window(x = x, y = y), week_start = wk_start) + 1 } +#' @export start_window.yearmonth <- function(x, y = NULL, ...) { x <- as_date(x) if (!is_null(y)) { @@ -263,6 +274,7 @@ start_window.yearmonth <- function(x, y = NULL, ...) { yearmonth(start_window(x = x, y = y)) } +#' @export end_window.yearmonth <- function(x, y = NULL, ...) { x <- as_date(x) if (!is_null(y)) { @@ -272,6 +284,7 @@ end_window.yearmonth <- function(x, y = NULL, ...) { yearmonth(end_window(x = x, y = y)) + 1 } +#' @export start_window.yearquarter <- function(x, y = NULL, ...) { x <- as_date(x) if (!is_null(y)) { @@ -281,6 +294,7 @@ start_window.yearquarter <- function(x, y = NULL, ...) { yearquarter(start_window(x = x, y = y)) } +#' @export end_window.yearquarter <- function(x, y = NULL, ...) { x <- as_date(x) if (!is_null(y)) { @@ -290,21 +304,25 @@ end_window.yearquarter <- function(x, y = NULL, ...) { yearquarter(end_window(x = x, y = y)) + 1 } +#' @export start_window.yearmon <- function(x, y = NULL, ...) { x <- yearmonth(x) start_window(x, y = y) } +#' @export end_window.yearmon <- function(x, y = NULL, ...) { x <- yearmonth(x) end_window(x, y = y) } +#' @export start_window.yearqtr <- function(x, y = NULL, ...) { x <- yearquarter(x) start_window(x, y = y) } +#' @export end_window.yearqtr <- function(x, y = NULL, ...) { x <- yearquarter(x) end_window(x, y = y) diff --git a/R/gaps.R b/R/gaps.R index 220e2b9f..c2007db9 100644 --- a/R/gaps.R +++ b/R/gaps.R @@ -2,7 +2,7 @@ globalVariables(c(".", ".gaps")) #' Turn implicit missing values into explicit missing values #' -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' @param .data A tsibble. #' @param ... A set of name-value pairs. The values provided will only replace diff --git a/R/index-by.R b/R/index-by.R index 7c22e913..47a1f451 100644 --- a/R/index-by.R +++ b/R/index-by.R @@ -1,7 +1,7 @@ #' Group by time index and collapse with `summarise()` #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' `index_by()` is the counterpart of `group_by()` in temporal context, but it #' only groups the time index. The following operation is applied to each partition diff --git a/R/index-valid.R b/R/index-valid.R index 52ec4a7b..418bb097 100644 --- a/R/index-valid.R +++ b/R/index-valid.R @@ -1,7 +1,7 @@ #' Add custom index support for a tsibble #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' S3 method to add an index type support for a tsibble. #' diff --git a/R/interval.R b/R/interval.R index 9750cd4f..43591565 100644 --- a/R/interval.R +++ b/R/interval.R @@ -1,7 +1,7 @@ #' Pull time interval from a vector #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' Assuming regularly spaced time, the `interval_pull()` returns a list of time #' components as the "interval" class. @@ -149,7 +149,7 @@ interval_pull.ordered <- function(x) { #' Interval constructor for a tsibble #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' * `new_interval()` creates an interval object. #' * `gcd_interval()` computes the greatest common divisor for the difference #' of numerics. @@ -248,7 +248,7 @@ format.interval <- function(x, ...) { #' Time units from tsibble's "interval" class used for `seq(by = )` #' -#' \lifecycle{experimental} +#' `r lifecycle::badge('experimental')` #' #' @param x An interval. #' @export diff --git a/R/new-data.R b/R/new-data.R index 981a56e4..424e86f6 100644 --- a/R/new-data.R +++ b/R/new-data.R @@ -1,6 +1,6 @@ #' New tsibble data and append new observations to a tsibble #' -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' @param .data A `tbl_ts`. #' @param n An integer indicates the number of key-index pair to append. If diff --git a/R/rolling.R b/R/rolling.R index f3bfd123..8ab21852 100644 --- a/R/rolling.R +++ b/R/rolling.R @@ -23,7 +23,7 @@ check_slider_input <- function(.x, .size = 1, .step = 1) { #' Perform sliding windows on a tsibble by row #' -#' \lifecycle{questioning} +#' `r lifecycle::badge('questioning')` #' #' @param .x A tsibble. #' @param .size A positive integer for window size. @@ -94,7 +94,7 @@ roll_tsibble <- function(.x, indices, .id = ".id") { #' Perform tiling windows on a tsibble by row #' -#' \lifecycle{questioning} +#' `r lifecycle::badge('questioning')` #' #' @param .x A tsibble. #' @param .size A positive integer for window size. @@ -129,7 +129,7 @@ tiler2 <- function(.x, .size = 1) { #' Perform stretching windows on a tsibble by row #' -#' \lifecycle{questioning} +#' `r lifecycle::badge('questioning')` #' #' @param .x A tsibble. #' @param .step A positive integer for incremental step. diff --git a/R/tidyr-verbs.R b/R/tidyr-verbs.R index fbe9ae49..10fd7e09 100644 --- a/R/tidyr-verbs.R +++ b/R/tidyr-verbs.R @@ -128,7 +128,7 @@ unnest.tbl_ts <- function(data, ...) { #' Unnest a data frame consisting of tsibbles to a tsibble #' #' @description -#' \lifecycle{deprecated} +#' `r lifecycle::badge('deprecated')` #' #' @param data A data frame contains homogenous tsibbles in the list-columns. #' @param cols Names of columns to unnest. diff --git a/R/time-wise.R b/R/time-wise.R index 737d4271..397b96cf 100644 --- a/R/time-wise.R +++ b/R/time-wise.R @@ -1,7 +1,7 @@ #' Lagged differences #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' @inheritParams dplyr::lag #' @param lag A positive integer indicating which lag to use. diff --git a/R/tsibble-meta.R b/R/tsibble-meta.R index 4c015f29..b29cfae3 100644 --- a/R/tsibble-meta.R +++ b/R/tsibble-meta.R @@ -214,7 +214,7 @@ is_ordered <- function(x) { #' If the object is a tsibble #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' @param x An object. #' diff --git a/R/tsibble-package.R b/R/tsibble-package.R index 0051d12f..b3ee6fed 100644 --- a/R/tsibble-package.R +++ b/R/tsibble-package.R @@ -71,24 +71,6 @@ #' The tsibble package fully utilises the `print` method from the tibble. Please #' refer to [tibble::tibble-package] to change display options. #' -#' @aliases NULL tsibble-package -#' @importFrom utils head tail -#' @importFrom stats frequency start end time ts as.ts tsp<- -#' @importFrom anytime assertTime assertDate utcdate utctime anydate -#' @importFrom anytime addFormats removeFormats -#' @importFrom lubridate make_date wday floor_date year month period as.period -#' @importFrom lubridate as.duration -#' @importFrom lubridate quarter is.POSIXct rollback force_tz tz is.POSIXt is.Date -#' @importFrom lubridate decimal_date date_decimal round_date -#' @importFrom lubridate seconds_to_period month<- weeks days as_date -#' @importFrom dplyr arrange filter select mutate transmute summarise rename -#' @importFrom dplyr group_by ungroup group_data grouped_df group_vars -#' @importFrom dplyr group_rows groups new_grouped_df is_grouped_df -#' @importFrom dplyr left_join right_join full_join inner_join anti_join -#' @importFrom dplyr bind_rows bind_cols combine with_order pull first reframe -#' @importFrom dplyr dplyr_row_slice dplyr_col_modify dplyr_reconstruct -#' @importFrom tibble new_tibble trunc_mat -#' @import rlang tidyselect vctrs ellipsis #' @examples #' # create a tsibble w/o a key ---- #' tsibble( @@ -114,3 +96,25 @@ stub <- function() { ## I have to import it if I want to state a minimum version. if (FALSE) lifecycle::deprecate_soft() } + +## usethis namespace: start +#' @importFrom lifecycle deprecated +#' @importFrom utils head tail +#' @importFrom stats frequency start end time ts as.ts tsp<- +#' @importFrom anytime assertTime assertDate utcdate utctime anydate +#' @importFrom anytime addFormats removeFormats +#' @importFrom lubridate make_date wday floor_date year month period as.period +#' @importFrom lubridate as.duration +#' @importFrom lubridate quarter is.POSIXct rollback force_tz tz is.POSIXt is.Date +#' @importFrom lubridate decimal_date date_decimal round_date +#' @importFrom lubridate seconds_to_period month<- weeks days as_date +#' @importFrom dplyr arrange filter select mutate transmute summarise rename +#' @importFrom dplyr group_by ungroup group_data grouped_df group_vars +#' @importFrom dplyr group_rows groups new_grouped_df is_grouped_df +#' @importFrom dplyr left_join right_join full_join inner_join anti_join +#' @importFrom dplyr bind_rows bind_cols combine with_order pull first reframe +#' @importFrom dplyr dplyr_row_slice dplyr_col_modify dplyr_reconstruct +#' @importFrom tibble new_tibble trunc_mat +#' @import rlang tidyselect vctrs ellipsis +## usethis namespace: end +NULL diff --git a/R/tsibble2ts.R b/R/tsibble2ts.R index 14fdcf17..84fd5ccf 100644 --- a/R/tsibble2ts.R +++ b/R/tsibble2ts.R @@ -1,6 +1,6 @@ #' Coerce a tsibble to a time series #' -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' @param x A `tbl_ts` object. #' @param value A measured variable of interest to be spread over columns, if @@ -73,28 +73,33 @@ time_ts <- function(x, ...) { UseMethod("time_ts") } +#' @export time_ts.yearweek <- function(x, ...) { freq <- guess_frequency(x) y <- decimal_date(x) ts(y, start = min0(y), frequency = freq) } +#' @export time_ts.yearmonth <- function(x, ...) { freq <- guess_frequency(x) y <- year(x) + (month(x) - 1) / freq ts(y, start = min0(y), frequency = freq) } +#' @export time_ts.yearquarter <- function(x, ...) { freq <- guess_frequency(x) y <- year(x) + (quarter(x) - 1) / freq ts(y, start = min0(y), frequency = freq) } +#' @export time_ts.numeric <- function(x, ...) { ts(x, start = min0(x), frequency = 1) } +#' @export time_ts.Date <- function(x, frequency = NULL, ...) { if (is.null(frequency)) { frequency <- guess_frequency(x) @@ -103,6 +108,7 @@ time_ts.Date <- function(x, frequency = NULL, ...) { ts(x, start = min0(y), frequency = frequency) } +#' @export time_ts.POSIXt <- function(x, frequency = NULL, ...) { if (is.null(frequency)) { frequency <- guess_frequency(x) @@ -114,7 +120,7 @@ time_ts.POSIXt <- function(x, frequency = NULL, ...) { #' Guess a time frequency from other index objects #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' A possible frequency passed to the `ts()` function #' diff --git a/R/yearmonth.R b/R/yearmonth.R index ae10947f..dacee361 100644 --- a/R/yearmonth.R +++ b/R/yearmonth.R @@ -1,7 +1,7 @@ #' Represent year-month #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' Create or coerce using `yearmonth()`. #' diff --git a/R/yearquarter.R b/R/yearquarter.R index 4f96754b..698a4573 100644 --- a/R/yearquarter.R +++ b/R/yearquarter.R @@ -1,7 +1,7 @@ #' Represent year-quarter #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' Create or coerce using `yearquarter()`. #' @@ -363,6 +363,7 @@ seq.yearquarter <- function(from, to, by, length.out = NULL, along.with = NULL, } } +#' @export seq.ordered <- function(from, to, by, ...) { bad_by(by) lvls <- levels(from) diff --git a/R/yearweek.R b/R/yearweek.R index 02f3c28e..7b063b11 100644 --- a/R/yearweek.R +++ b/R/yearweek.R @@ -1,7 +1,7 @@ #' Represent year-week based on the ISO 8601 standard (with flexible start day) #' #' @description -#' \lifecycle{stable} +#' `r lifecycle::badge('stable')` #' #' Create or coerce using `yearweek()`. #' diff --git a/README.Rmd b/README.Rmd index c1f9cc16..68a47a4f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -8,8 +8,13 @@ output: # tsibble -[![R build status](https://github.com/tidyverts/tsibble/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverts/tsibble/actions?workflow=R-CMD-check) -[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/tsibble)](https://cran.r-project.org/package=tsibble) + + +[![R-CMD-check](https://github.com/tidyverts/tsibble/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidyverts/tsibble/actions/workflows/R-CMD-check.yaml) +[![CRAN status](https://www.r-pkg.org/badges/version/tsibble)](https://CRAN.R-project.org/package=tsibble) +[![Codecov test coverage](https://codecov.io/gh/tidyverts/tsibble/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverts/tsibble?branch=main) + + ```{r, echo = FALSE} knitr::opts_chunk$set( diff --git a/README.md b/README.md index 5422528e..aa2288d1 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,14 @@ # tsibble -[![R build -status](https://github.com/tidyverts/tsibble/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverts/tsibble/actions?workflow=R-CMD-check) -[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/tsibble)](https://cran.r-project.org/package=tsibble) + + +[![R-CMD-check](https://github.com/tidyverts/tsibble/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidyverts/tsibble/actions/workflows/R-CMD-check.yaml) +[![CRAN +status](https://www.r-pkg.org/badges/version/tsibble)](https://CRAN.R-project.org/package=tsibble) +[![Codecov test +coverage](https://codecov.io/gh/tidyverts/tsibble/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidyverts/tsibble?branch=main) + The **tsibble** package provides a data infrastructure for tidy temporal data with wrangling tools. Adapting the [tidy data diff --git a/_pkgdown.yml b/_pkgdown.yml index 8bb0565e..4b40bcf8 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,12 +1,10 @@ url: https://tsibble.tidyverts.org template: + bootstrap: 5 + bootswatch: cosmo params: - bootswatch: cosmo ganalytics: UA-83007123-4 - docsearch: - api_key: b7cf533da009fba6bd7a07d530e0824e - index_name: tsibble development: mode: auto @@ -15,16 +13,16 @@ authors: Earo Wang: href: https://earo.me Di Cook: - href: http://dicook.org + href: https://www.dicook.org/ Rob Hyndman: - href: http://robjhyndman.com + href: https://robjhyndman.com/ Mitchell O'Hara-Wild: - href: http://mitchelloharawild.com + href: https://blog.mitchelloharawild.com/ reference: - title: Overview desc: > - Describes the key components underlying a **tsibble**, or `tbl_ts`: index, + Describes the key components underlying a **tsibble**, or `tbl_ts`: index, key, interval. contents: - tsibble-package @@ -43,9 +41,9 @@ reference: - title: Tsibble verbs desc: > Verbs that manipulate data in time-based context. Inspect implicit time - gaps with `has_gaps()`, `scan_gaps()`, `count_gaps()` and `fill_gaps()`. - `filter_index()` is a shorthand for filtering time index. `index_by()` and - `group_by_key()` create a grouped tsibble, or `grouped_ts`, but how the data + gaps with `has_gaps()`, `scan_gaps()`, `count_gaps()` and `fill_gaps()`. + `filter_index()` is a shorthand for filtering time index. `index_by()` and + `group_by_key()` create a grouped tsibble, or `grouped_ts`, but how the data looks remains unchanged. Both requires to work with other `tidyverse` verbs. contents: - has_gaps @@ -93,7 +91,7 @@ reference: desc: > Add **tsibble** support for custom index classes with `index_valid()` & `interval_pull()`. `build_tsibble()` provides low-level construction for - tsibble. Create a subclass of the tsibble with `new_tsibble()`. + tsibble. Create a subclass of the tsibble with `new_tsibble()`. contents: - index_valid - interval_pull @@ -126,6 +124,3 @@ navbar: href: articles/faq.html - text: News href: news/index.html - right: - - icon: fa-github fa-lg - href: https://github.com/tidyverts/tsibble diff --git a/inst/WORDLIST b/inst/WORDLIST index a93444a6..f8be54ea 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -5,6 +5,7 @@ binded Birrarung Bourke center +CMD df dplyr ed diff --git a/man/as-tsibble.Rd b/man/as-tsibble.Rd index 725d63e3..7bcbdf57 100644 --- a/man/as-tsibble.Rd +++ b/man/as-tsibble.Rd @@ -49,7 +49,7 @@ daily.} A tsibble object. } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \details{ A tsibble is sorted by its key first and index. diff --git a/man/as.ts.tbl_ts.Rd b/man/as.ts.tbl_ts.Rd index 3b16da3a..249a45eb 100644 --- a/man/as.ts.tbl_ts.Rd +++ b/man/as.ts.tbl_ts.Rd @@ -23,7 +23,7 @@ preferred frequency is passed to \code{ts()}.} A \code{ts} object. } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \examples{ # a monthly series diff --git a/man/build_tsibble_meta.Rd b/man/build_tsibble_meta.Rd index c871bcf7..4e444337 100644 --- a/man/build_tsibble_meta.Rd +++ b/man/build_tsibble_meta.Rd @@ -28,7 +28,7 @@ the correct order. \code{FALSE} checks the ordering and may give a warning.} irregular interval. Use the specified interval via \code{\link[=new_interval]{new_interval()}} as is.} } \description{ -\lifecycle{experimental} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} \code{build_tsibble_meta()} does much less checks than \code{build_tsibble()} for high performance. diff --git a/man/default_time_units.Rd b/man/default_time_units.Rd index 5008cab9..d64a0c61 100644 --- a/man/default_time_units.Rd +++ b/man/default_time_units.Rd @@ -10,6 +10,6 @@ default_time_units(x) \item{x}{An interval.} } \description{ -\lifecycle{experimental} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#experimental}{\figure{lifecycle-experimental.svg}{options: alt='[Experimental]'}}}{\strong{[Experimental]}} } \keyword{internal} diff --git a/man/difference.Rd b/man/difference.Rd index 5f1516a2..314ffdca 100644 --- a/man/difference.Rd +++ b/man/difference.Rd @@ -26,7 +26,7 @@ size as \code{x}.} A numeric vector of the same length as \code{x}. } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \examples{ # examples from base diff --git a/man/duplicates.Rd b/man/duplicates.Rd index e08839f5..8831c58f 100644 --- a/man/duplicates.Rd +++ b/man/duplicates.Rd @@ -25,7 +25,7 @@ empty key, and \code{c()} for multiple variables. It works with tidy selector elements.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} \itemize{ \item \code{is_duplicated()}: a logical scalar if the data exist duplicated observations. \item \code{are_duplicated()}: a logical vector, the same length as the row number of \code{data}. diff --git a/man/figures/lifecycle-archived.svg b/man/figures/lifecycle-archived.svg index 48f72a6f..745ab0c7 100644 --- a/man/figures/lifecycle-archived.svg +++ b/man/figures/lifecycle-archived.svg @@ -1 +1,21 @@ - lifecyclelifecyclearchivedarchived \ No newline at end of file + + lifecycle: archived + + + + + + + + + + + + + + + lifecycle + + archived + + diff --git a/man/figures/lifecycle-defunct.svg b/man/figures/lifecycle-defunct.svg index 01452e5f..d5c9559e 100644 --- a/man/figures/lifecycle-defunct.svg +++ b/man/figures/lifecycle-defunct.svg @@ -1 +1,21 @@ -lifecyclelifecycledefunctdefunct \ No newline at end of file + + lifecycle: defunct + + + + + + + + + + + + + + + lifecycle + + defunct + + diff --git a/man/figures/lifecycle-deprecated.svg b/man/figures/lifecycle-deprecated.svg index 4baaee01..b61c57c3 100644 --- a/man/figures/lifecycle-deprecated.svg +++ b/man/figures/lifecycle-deprecated.svg @@ -1 +1,21 @@ -lifecyclelifecycledeprecateddeprecated \ No newline at end of file + + lifecycle: deprecated + + + + + + + + + + + + + + + lifecycle + + deprecated + + diff --git a/man/figures/lifecycle-experimental.svg b/man/figures/lifecycle-experimental.svg index d1d060e9..5d88fc2c 100644 --- a/man/figures/lifecycle-experimental.svg +++ b/man/figures/lifecycle-experimental.svg @@ -1 +1,21 @@ -lifecyclelifecycleexperimentalexperimental \ No newline at end of file + + lifecycle: experimental + + + + + + + + + + + + + + + lifecycle + + experimental + + diff --git a/man/figures/lifecycle-maturing.svg b/man/figures/lifecycle-maturing.svg index df713101..897370ec 100644 --- a/man/figures/lifecycle-maturing.svg +++ b/man/figures/lifecycle-maturing.svg @@ -1 +1,21 @@ -lifecyclelifecyclematuringmaturing \ No newline at end of file + + lifecycle: maturing + + + + + + + + + + + + + + + lifecycle + + maturing + + diff --git a/man/figures/lifecycle-questioning.svg b/man/figures/lifecycle-questioning.svg index 08ee0c90..7c1721d0 100644 --- a/man/figures/lifecycle-questioning.svg +++ b/man/figures/lifecycle-questioning.svg @@ -1 +1,21 @@ -lifecyclelifecyclequestioningquestioning \ No newline at end of file + + lifecycle: questioning + + + + + + + + + + + + + + + lifecycle + + questioning + + diff --git a/man/figures/lifecycle-soft-deprecated.svg b/man/figures/lifecycle-soft-deprecated.svg index 9f014fd1..9c166ff3 100644 --- a/man/figures/lifecycle-soft-deprecated.svg +++ b/man/figures/lifecycle-soft-deprecated.svg @@ -1 +1,21 @@ -lifecyclelifecyclesoft-deprecatedsoft-deprecated \ No newline at end of file + + lifecycle: soft-deprecated + + + + + + + + + + + + + + + lifecycle + + soft-deprecated + + diff --git a/man/figures/lifecycle-stable.svg b/man/figures/lifecycle-stable.svg index e015dc81..9bf21e76 100644 --- a/man/figures/lifecycle-stable.svg +++ b/man/figures/lifecycle-stable.svg @@ -1 +1,29 @@ -lifecyclelifecyclestablestable \ No newline at end of file + + lifecycle: stable + + + + + + + + + + + + + + + + lifecycle + + + + stable + + + diff --git a/man/figures/lifecycle-superseded.svg b/man/figures/lifecycle-superseded.svg new file mode 100644 index 00000000..db8d757f --- /dev/null +++ b/man/figures/lifecycle-superseded.svg @@ -0,0 +1,21 @@ + + lifecycle: superseded + + + + + + + + + + + + + + + lifecycle + + superseded + + diff --git a/man/fill_gaps.Rd b/man/fill_gaps.Rd index 324f8f4a..3ec64ebd 100644 --- a/man/fill_gaps.Rd +++ b/man/fill_gaps.Rd @@ -28,7 +28,7 @@ existing \code{NA} untouched. existing time spans.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \examples{ harvest <- tsibble( diff --git a/man/group_by_key.Rd b/man/group_by_key.Rd index f09d7230..61c2d425 100644 --- a/man/group_by_key.Rd +++ b/man/group_by_key.Rd @@ -16,7 +16,7 @@ data? The default is \code{TRUE} except when \code{.data} has been previously grouped with \code{.drop = FALSE}. See \code{\link[dplyr:group_by_drop_default]{group_by_drop_default()}} for details.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \examples{ tourism \%>\% diff --git a/man/guess_frequency.Rd b/man/guess_frequency.Rd index 039d3f92..670a7718 100644 --- a/man/guess_frequency.Rd +++ b/man/guess_frequency.Rd @@ -10,7 +10,7 @@ guess_frequency(x) \item{x}{An index object including "yearmonth", "yearquarter", "Date" and others.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} A possible frequency passed to the \code{ts()} function } diff --git a/man/index-by.Rd b/man/index-by.Rd index c4f593a1..9a7fb250 100644 --- a/man/index-by.Rd +++ b/man/index-by.Rd @@ -27,7 +27,7 @@ fine-resolution aggregation }} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} \code{index_by()} is the counterpart of \code{group_by()} in temporal context, but it only groups the time index. The following operation is applied to each partition diff --git a/man/index_valid.Rd b/man/index_valid.Rd index b9c8604e..98778d5c 100644 --- a/man/index_valid.Rd +++ b/man/index_valid.Rd @@ -13,7 +13,7 @@ index_valid(x) \code{TRUE}/\code{FALSE} or \code{NA} (unsure) } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} S3 method to add an index type support for a tsibble. } diff --git a/man/interval-pull.Rd b/man/interval-pull.Rd index b331a634..c3d89abc 100644 --- a/man/interval-pull.Rd +++ b/man/interval-pull.Rd @@ -15,7 +15,7 @@ An "interval" class (a list) includes "year", "microsecond", "nanosecond", "unit". } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} Assuming regularly spaced time, the \code{interval_pull()} returns a list of time components as the "interval" class. diff --git a/man/is-tsibble.Rd b/man/is-tsibble.Rd index cdc53166..a9ab475f 100644 --- a/man/is-tsibble.Rd +++ b/man/is-tsibble.Rd @@ -16,7 +16,7 @@ is_grouped_ts(x) TRUE if the object inherits from the tbl_ts class. } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \examples{ # A tibble is not a tsibble ---- diff --git a/man/new-data.Rd b/man/new-data.Rd index d1a7167c..764334d5 100644 --- a/man/new-data.Rd +++ b/man/new-data.Rd @@ -28,7 +28,7 @@ append_row(.data, n = 1L, ...) and key, otherwise only index and key.} } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} \code{append_row()}: add new rows to the start/end of a tsibble by filling a key-index pair and \code{NA} for measured variables. diff --git a/man/new-interval.Rd b/man/new-interval.Rd index acfa59d9..b383cda1 100644 --- a/man/new-interval.Rd +++ b/man/new-interval.Rd @@ -29,7 +29,7 @@ to allow custom interval.} an "interval" class } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} \itemize{ \item \code{new_interval()} creates an interval object. \item \code{gcd_interval()} computes the greatest common divisor for the difference diff --git a/man/slide_tsibble.Rd b/man/slide_tsibble.Rd index a36bc535..cfb9079f 100644 --- a/man/slide_tsibble.Rd +++ b/man/slide_tsibble.Rd @@ -17,7 +17,7 @@ instead of every single step.} \item{.id}{A character naming the new column \code{.id} containing the partition.} } \description{ -\lifecycle{questioning} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#questioning}{\figure{lifecycle-questioning.svg}{options: alt='[Questioning]'}}}{\strong{[Questioning]}} } \section{Rolling tsibble}{ diff --git a/man/stretch_tsibble.Rd b/man/stretch_tsibble.Rd index b6edf78a..42d65b28 100644 --- a/man/stretch_tsibble.Rd +++ b/man/stretch_tsibble.Rd @@ -16,7 +16,7 @@ stretch_tsibble(.x, .step = 1, .init = 1, .id = ".id") \item{.id}{A character naming the new column \code{.id} containing the partition.} } \description{ -\lifecycle{questioning} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#questioning}{\figure{lifecycle-questioning.svg}{options: alt='[Questioning]'}}}{\strong{[Questioning]}} } \section{Rolling tsibble}{ diff --git a/man/tile_tsibble.Rd b/man/tile_tsibble.Rd index b9963ab1..f7f660b5 100644 --- a/man/tile_tsibble.Rd +++ b/man/tile_tsibble.Rd @@ -14,7 +14,7 @@ tile_tsibble(.x, .size = 1, .id = ".id") \item{.id}{A character naming the new column \code{.id} containing the partition.} } \description{ -\lifecycle{questioning} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#questioning}{\figure{lifecycle-questioning.svg}{options: alt='[Questioning]'}}}{\strong{[Questioning]}} } \section{Rolling tsibble}{ diff --git a/man/tsibble.Rd b/man/tsibble.Rd index 08c12d6a..0a57a381 100644 --- a/man/tsibble.Rd +++ b/man/tsibble.Rd @@ -24,7 +24,7 @@ interval is determined by the greatest common divisor of index column, if \code{ A tsibble object. } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} } \details{ A tsibble is sorted by its key first and index. diff --git a/man/unnest_tsibble.Rd b/man/unnest_tsibble.Rd index 414e916f..19053426 100644 --- a/man/unnest_tsibble.Rd +++ b/man/unnest_tsibble.Rd @@ -20,6 +20,6 @@ of key variables leads to unique time indices (i.e. a valid tsibble). If you are sure that it's a valid input, specify \code{FALSE} to skip the checks.} } \description{ -\lifecycle{deprecated} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} } \keyword{internal} diff --git a/man/year-month.Rd b/man/year-month.Rd index c62e46f7..1201775d 100644 --- a/man/year-month.Rd +++ b/man/year-month.Rd @@ -29,7 +29,7 @@ if a warning or an error occurs.} year-month (\code{yearmonth}) objects. } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} Create or coerce using \code{yearmonth()}. } diff --git a/man/year-quarter.Rd b/man/year-quarter.Rd index d6463796..f6dc82e4 100644 --- a/man/year-quarter.Rd +++ b/man/year-quarter.Rd @@ -26,7 +26,7 @@ fiscal_year(x) year-quarter (\code{yearquarter}) objects. } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} Create or coerce using \code{yearquarter()}. } diff --git a/man/year-week.Rd b/man/year-week.Rd index bd08a047..5de257c6 100644 --- a/man/year-week.Rd +++ b/man/year-week.Rd @@ -34,7 +34,7 @@ year-week (\code{yearweek}) objects. \code{TRUE}/\code{FALSE} if the year has 53 ISO weeks. } \description{ -\lifecycle{stable} +\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} Create or coerce using \code{yearweek()}. } diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png new file mode 100644 index 00000000..49b80aff Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-120x120.png differ diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png new file mode 100644 index 00000000..5804aa69 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-60x60.png differ diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png new file mode 100644 index 00000000..ae341620 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-76x76.png differ diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png new file mode 100644 index 00000000..00a07edd Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon.png differ diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png new file mode 100644 index 00000000..27122838 Binary files /dev/null and b/pkgdown/favicon/favicon-16x16.png differ diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png new file mode 100644 index 00000000..b28cb27a Binary files /dev/null and b/pkgdown/favicon/favicon-32x32.png differ diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico new file mode 100644 index 00000000..63a7895a Binary files /dev/null and b/pkgdown/favicon/favicon.ico differ