-
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
base: master
Are you sure you want to change the base?
Conversation
…cripts for clarity and consistency
- Implement `concordance()` to calculate the concordance index for co-movement between two time series. - Introduce `direction_leadlag()` to detect lead-lag relationships and identify optimal lags in directional co-movement. - Create `direction_test()` to test the statistical significance of co-movement between two time series using various methods. - Add `rolling_direction()` to compute the rolling co-movement proportion over a specified window. - Develop `plot_rolling_direction()` for visualizing rolling co-movement with optional colored bands. - Document all new functions with corresponding examples and details in the man pages.
…and additional tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR prepares the tstoolbox R package for its initial CRAN submission (version 0.1.0). The package provides comprehensive tools for time series co-movement analysis and diagnostics, with a focus on directional co-movement — measuring when series rise and fall in sync.
Changes:
- Added comprehensive documentation including two vignettes, updated README, and complete roxygen documentation for all functions
- Implemented new co-movement analysis functions (rolling_direction, direction_test, direction_leadlag, concordance, asymmetric_direction)
- Added visualization functions (plot_rolling_direction, plot_xcf enhancements)
- Updated package metadata for CRAN compliance (LICENSE, DESCRIPTION, NAMESPACE)
Reviewed changes
Copilot reviewed 43 out of 44 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| DESCRIPTION | Updated package metadata with proper Authors@R format, MIT license, improved description, and complete dependency list |
| LICENSE | Added MIT license with copyright holder and year |
| NEWS.md | Added changelog documenting all functions for version 0.1.0 |
| NAMESPACE | Updated with new exports and imports for all new functions |
| README.md | Significantly expanded with comprehensive overview, function reference table, and examples |
| vignettes/introduction-to-comovement.Rmd | New comprehensive vignette covering co-movement analysis workflow |
| vignettes/additional-tools.Rmd | New vignette covering cross-correlation, adstock, and utility functions |
| R/*.R | Added new functions and improved documentation with roxygen2 for existing functions |
| man/*.Rd | Generated documentation files with examples and complete parameter descriptions |
| .gitignore, .Rbuildignore, .github/PULL_REQUEST_TEMPLATE.md | Added configuration files for development workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| plot(stocks$date, roll, type = "l", | ||
| ylim = c(0.3, 1), | ||
| main = paste("Window =", w, "days"), |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation is inconsistent. Line 176 has only 1 space of indentation while line 177 has 7 spaces. This should be corrected to have consistent indentation (typically 2 or 4 spaces for continuation lines within a function call).
| #' ("correlations go to 1 in a crisis"). | ||
| #' | ||
| #' The function: | ||
| #' 1 |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation has an incomplete numbered list. Line 29 shows "1" without any corresponding text, and then jumps to items 2 and 3. This will cause rendering issues in the documentation. Add the missing text for step 1 (likely "Identifies upturn and downturn periods based on the reference series" or similar).
| #' 1 | |
| #' 1. Identifies upturn and downturn periods based on the reference series |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
This PR prepares the tstoolbox package for CRAN release.
Type of Change
Related Issues
Checklist
Code Quality
Documentation
@examplesfor new exported functionsTesting
R CMD check
devtools::check()passes with 0 errors, 0 warnings, and 0 notesAdditional Notes