-
Notifications
You must be signed in to change notification settings - Fork 3
Prepare for cran release #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
martinctc
wants to merge
17
commits into
master
Choose a base branch
from
prepare-for-cran-release
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c8f91d3
chore: update DESCRIPTION, LICENSE, NEWS.md, and README for CRAN release
martinctc 9e2c1b9
chore: update documentation and import statements across multiple R s…
martinctc 9aeba18
chore: add pull request template for improved contribution guidelines
martinctc 207b278
feat: Add functions for analyzing co-movement in time series
martinctc 94cf109
docs: update README.md
martinctc 0c2a883
chore: update DESCRIPTION and add vignettes for co-movement analysis …
martinctc 2c2a879
chore: code formatting
martinctc d0bae10
chore: add undeclared dependencies
martinctc 80db53c
chore: add undeclared dependencies
martinctc c3d925f
chore: add undeclared dependencies
martinctc 471e915
chore
martinctc 7af083d
chore: add setup-pandoc action to R-CMD-check workflow
martinctc 13c64e3
chore: update DESCRIPTION for testthat dependency and add test scripts
martinctc 508823e
chore: add pkgdown workflow and configuration files for documentation…
martinctc 61ce59f
chore: add CITATION file for package metadata
martinctc 4efe0b7
chore: add detailed documentation for tstoolbox package functions
martinctc 9c751a1
chore: add comprehensive tests for various functions including asymme…
martinctc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| ^.*\.Rproj$ | ||
| ^\.Rproj\.user$ | ||
| ^\.github$ | ||
| ^\.vscode$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| ## Description | ||
|
|
||
| <!-- Briefly describe the changes in this PR --> | ||
|
|
||
| ## Type of Change | ||
|
|
||
| <!-- Mark the relevant option with an "x" --> | ||
|
|
||
| - [ ] Bug fix (non-breaking change that fixes an issue) | ||
| - [ ] New feature (non-breaking change that adds functionality) | ||
| - [ ] Breaking change (fix or feature that would cause existing functionality to change) | ||
| - [ ] Documentation update | ||
| - [ ] Code refactoring (no functional changes) | ||
|
|
||
| ## Related Issues | ||
|
|
||
| <!-- Link any related issues here using "Fixes #123" or "Closes #123" --> | ||
|
|
||
| ## Checklist | ||
|
|
||
| <!-- Mark completed items with an "x" --> | ||
|
|
||
| ### Code Quality | ||
| - [ ] My code follows the tidyverse style guide | ||
| - [ ] I have commented my code where necessary | ||
| - [ ] I have made corresponding changes to the documentation | ||
|
|
||
| ### Documentation | ||
| - [ ] I have added/updated roxygen2 documentation for any new/changed functions | ||
| - [ ] I have added `@examples` for new exported functions | ||
| - [ ] I have updated the README if needed | ||
| - [ ] I have added a bullet to NEWS.md describing the changes | ||
|
|
||
| ### Testing | ||
| - [ ] I have added tests that prove my fix/feature works | ||
| - [ ] New and existing tests pass locally with my changes | ||
|
|
||
| ### R CMD check | ||
| - [ ] `devtools::check()` passes with 0 errors, 0 warnings, and 0 notes | ||
|
|
||
| ## Additional Notes | ||
|
|
||
| <!-- Any additional information that reviewers should know --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # 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] | ||
| 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@v3 | ||
|
|
||
| - uses: r-lib/actions/setup-pandoc@v2 | ||
|
|
||
| - uses: r-lib/actions/setup-r@v2 | ||
| with: | ||
| use-public-rspm: true | ||
|
|
||
| - uses: r-lib/actions/setup-r-dependencies@v2 | ||
| with: | ||
| extra-packages: any::pkgdown, local::. | ||
| needs: website | ||
|
|
||
| - 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.4.1 | ||
| with: | ||
| clean: false | ||
| branch: gh-pages | ||
| folder: docs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,34 @@ | ||
| Package: tstoolbox | ||
| Type: Package | ||
| Title: Useful tools for time series analysis | ||
| Version: 0.1.0 | ||
| Author: Martin Chan | ||
| Maintainer: Martin Chan <martinchan53@gmail.com> | ||
| Description: Useful tools for time series analysis. | ||
| License: What license is it under? | ||
| Encoding: UTF-8 | ||
| LazyData: true | ||
| Imports: base, dplyr, ggplot2, ggthemes, stats, rlang, lubridate, Rfast, magrittr | ||
| RoxygenNote: 7.1.0 | ||
| Package: tstoolbox | ||
| Type: Package | ||
| Title: Tools for Time Series Analysis and Diagnostics | ||
| Version: 0.1.0 | ||
| Authors@R: | ||
| person("Martin", "Chan", , "martinchan53@gmail.com", role = c("aut", "cre")) | ||
| Description: Provides utility functions for time series analysis including | ||
| direction analysis (measuring co-movement between series), cross-correlation | ||
| analysis with visualization, adstock transformation and reversal, and various | ||
| helper functions for time series diagnostics and exploration. | ||
| License: MIT + file LICENSE | ||
| Encoding: UTF-8 | ||
| URL: https://github.com/martinctc/tstoolbox | ||
| BugReports: https://github.com/martinctc/tstoolbox/issues | ||
| Imports: | ||
| dplyr, | ||
| ggplot2, | ||
| ggthemes, | ||
| glue, | ||
| lubridate, | ||
| magrittr, | ||
| Rfast, | ||
| rlang, | ||
| scales, | ||
| stats, | ||
| tibble, | ||
| tidyr | ||
| Suggests: | ||
| knitr, | ||
| rmarkdown, | ||
| testthat (>= 3.0.0) | ||
| Config/testthat/edition: 3 | ||
| VignetteBuilder: knitr | ||
| RoxygenNote: 7.3.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| YEAR: 2026 | ||
| COPYRIGHT HOLDER: Martin Chan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,59 @@ | ||
| # Generated by roxygen2: do not edit by hand | ||
|
|
||
| S3method(plot,direction_leadlag) | ||
| S3method(print,asymmetric_direction) | ||
| S3method(print,concordance) | ||
| S3method(print,direction_leadlag) | ||
| S3method(print,direction_test) | ||
| export("%>%") | ||
| export(adstock) | ||
| export(analyse_direction) | ||
| export(asymmetric_direction) | ||
| export(concordance) | ||
| export(direction) | ||
| export(direction_leadlag) | ||
| export(direction_test) | ||
| export(pc_change) | ||
| export(plot_rolling_direction) | ||
| export(plot_xcf) | ||
| export(return_k_date) | ||
| export(reverse_adstock) | ||
| export(rolling_direction) | ||
| export(stend_line) | ||
| export(sumlagdiff) | ||
| export(ts_summarise) | ||
| export(xcf) | ||
| import(lubridate) | ||
| importFrom(Rfast,nth) | ||
| importFrom(dplyr,group_by) | ||
| importFrom(dplyr,lag) | ||
| importFrom(dplyr,mutate) | ||
| importFrom(dplyr,mutate_at) | ||
| importFrom(dplyr,summarise) | ||
| importFrom(dplyr,summarise_at) | ||
| importFrom(dplyr,vars) | ||
| importFrom(ggplot2,aes) | ||
| importFrom(ggplot2,annotate) | ||
| importFrom(ggplot2,element_text) | ||
| importFrom(ggplot2,geom_bar) | ||
| importFrom(ggplot2,geom_col) | ||
| importFrom(ggplot2,geom_hline) | ||
| importFrom(ggplot2,geom_line) | ||
| importFrom(ggplot2,geom_ribbon) | ||
| importFrom(ggplot2,geom_vline) | ||
| importFrom(ggplot2,ggplot) | ||
| importFrom(ggplot2,ggtitle) | ||
| importFrom(ggplot2,labs) | ||
| importFrom(ggplot2,scale_fill_gradient2) | ||
| importFrom(ggplot2,scale_fill_manual) | ||
| importFrom(ggplot2,scale_y_continuous) | ||
| importFrom(ggplot2,theme) | ||
| importFrom(ggplot2,theme_minimal) | ||
| importFrom(ggplot2,ylab) | ||
| importFrom(lubridate,floor_date) | ||
| importFrom(magrittr,"%>%") | ||
| importFrom(rlang,`:=`) | ||
| importFrom(rlang,enquo) | ||
| importFrom(rlang,sym) | ||
| importFrom(stats,ccf) | ||
| importFrom(tibble,as_tibble) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # tstoolbox 0.1.0 | ||
|
|
||
| * Initial CRAN submission | ||
|
|
||
| ## Co-movement Analysis (New) | ||
| * `rolling_direction()` - Calculate co-movement proportion over rolling windows | ||
| * `direction_test()` - Statistical significance testing for co-movement (binomial, permutation, bootstrap) | ||
| * `plot_rolling_direction()` - Visualize rolling co-movement over time | ||
| * `direction_leadlag()` - Detect lead-lag relationships in directional co-movement | ||
| * `concordance()` - Harding-Pagan concordance index for formal co-movement measurement | ||
| * `asymmetric_direction()` - Analyse if co-movement differs during upturns vs downturns | ||
|
|
||
| ## Direction Analysis | ||
| * `analyse_direction()` - Analyse co-movement between two numeric variables | ||
| * `direction()` - Return direction of change relative to previous value | ||
|
|
||
| ## Cross-correlation | ||
| * `xcf()` - Create cross-correlation table | ||
| * `plot_xcf()` - Create pretty cross-correlation plot | ||
|
|
||
| ## Adstock Transformations | ||
| * `adstock()` - Calculate adstock (decay) transformation | ||
| * `reverse_adstock()` - Convert adstocked values back to original | ||
|
|
||
| ## Time Series Utilities | ||
| * `ts_summarise()` - Group-summarise a time series by time interval | ||
| * `return_k_date()` - Return k-th most recent or oldest date from a vector | ||
| * `pc_change()` - Calculate percentage change relative to lag k | ||
| * `stend_line()` - Generate linear vector between start and end values | ||
| * `sumlagdiff()` - Sum of absolute differences (fluctuation score) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.