-
Notifications
You must be signed in to change notification settings - Fork 4
Use redquack for REDCap API, add parameters to import_instruments(), add codebook functions, and update to 1.2.0
#76
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
Conversation
import_instruments(): Use redquack for REDCap API export with filtering and list supportimport_instruments(): Use redquack for REDCap API export with filtering and list support
- Bump version from 1.1.2 to 1.2 in DESCRIPTION - Update NEWS.md with comprehensive 1.2 changelog - Update README.md with new v1.2 feature highlights - Switch example URLs from Miami to bbmc.ouhsc.edu (Miami token no longer works) - Improve vignette formatting and documentation clarity - Enhance import_instruments() with filtering and list return features - Add comprehensive test coverage for new parameters - Preserve record_id labels when drop_blank=TRUE and labels=TRUE - Keep empty data.frame structure instead of setting to NULL 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
… keyring docs - Enhanced drop_label() function to support multiple variable selection using tidyselect helpers - Updated function calls to use new drop_label() interface with multiple variables - Fixed keyring documentation formatting in useAPI.Rmd vignette - Regenerated documentation for drop_label() function 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
import_instruments(): Use redquack for REDCap API export with filtering and list supportimport_instruments(): Use redquack for REDCap API, add parameters, and update to 1.2
- Replace labelVector dependency with labelled package in DESCRIPTION and NAMESPACE - Update all label handling functions to use labelled::var_label syntax - Add Dylan Pieper as package author with ORCID - Fix label cleaning to remove numbered suffixes (e.g., "Complete?...10" -> "Complete?") - Remove deprecated dropLabels vignette and related HTML documentation - Add new sample data files for vignettes - Update README with clearer package description and functionality - Update test expectations to match cleaned labels Fixes #75 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Removed outdated redcapAPI example and enhanced keyring section with practical code examples showing secure token storage and retrieval. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
@RaymondBalise: I updated the PR with substantive changes that should fix a few additional issues, and I made some heavy handed edits to the docs. For example, the REDCap instance for the nacho anxiety examples did not work for me, and it made more sense for me to use the University of Oklahoma's instance, as it's used in the tests. Let me know if you have any concerns, and when you might have time to review. |
|
🤖 Claude's summary of additional changes: Functionality:
Testing & Documentation:
These improvements make the package significantly more robust for production use with large REDCap projects. |
import_instruments(): Use redquack for REDCap API, add parameters, and update to 1.2import_instruments(): Use redquack for REDCap API, add parameters, and update to 1.2.0
Replace undefined 'redcap' object references with 'sample_data' and update ingredient variables to use available race variables in sample data. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add /doc/ and /Meta/ to gitignore and fix bullet point formatting in import_instruments.Rmd for better readability. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add simulation of missing data to properly demonstrate the make_instrument function's ability to filter out completely empty records. Also fix minor text reference in makeChooseOneTable vignette. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Implement codebook() S3 generic with data.frame and default methods - Add value label parsing for REDCap categorical variables - Update NAMESPACE with new exports and CLI imports - Document new functionality in NEWS.md and README.md - Add codebook vignette section with usage examples - Include comprehensive test suite for codebook functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove magrittr pipe operator and related files (utils-pipe.R, pipe.Rd) - Replace %>% with |> throughout codebase - Add DBI, duckdb, redquack as new dependencies - Remove magrittr dependency - Update imports and add missing import declarations - Add .claude to .Rbuildignore 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
import_instruments(): Use redquack for REDCap API, add parameters, and update to 1.2.0import_instruments(): Use redquack for REDCap API, add parameters, add codebook(), and update to 1.2.0
… labels - Add codebook_convert() with S3 methods for data.frame and default - Add has_redcap_values() helper function for identifying labeled columns - Document functions in README, NEWS, and vignettes with usage examples - Add comprehensive test coverage for various data types and edge cases - Support both data.frame$column and data.frame["column"] syntax patterns 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
import_instruments(): Use redquack for REDCap API, add parameters, add codebook(), and update to 1.2.0import_instruments(), add codebook functions, and update to 1.2.0
- Add comprehensive error checking for REDCapR API calls - Extract meaningful error messages from REDCap server responses - Provide specific guidance for common issues (403, 404, network errors) - Improve user experience with informative error messages instead of generic failures - Add robust error handling tests covering token validation, API permissions, and network issues - Maintain original function behavior (invisible return for environment mode, list for list mode) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Update make_yes_no() and make_yes_no_unknown() functions to preserve variable labels during factor conversion, addressing issue #50. Both functions now store original labels before transformation and restore them on the result using the labelled package. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace detailed custom error messages with generic API error messages - Use outcome_message from REDCapR for metadata and labels read failures - Add error handling for redcap_to_db data import step - Update test expectations to match simplified error messages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace apply() with for loops to prevent stack overflow on large datasets. Resolves issue #68 where 1750+ row datasets caused C stack usage errors. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
@RaymondBalise Have fun at REDCapConf! After next week, I'll be out until Oct 6th for my wedding / honeymoon! I think we should hold off on this PR until I get some functions sorted for redquack's Feel free to browse what I have done here, but we should break up this work into smaller PRs. |
💥 tidyREDCap gains a big data friendly duckdb backend! 💥
This PR introduces version 1.2.0 with major updates to
import_instruments()and new codebook functions:codebook()function to access metadata from imported datacodebook_convert()to convert coded values to their labeled equivalentsAdds parameters to
import_instruments():filter_instrumentandfilter_functionfor lazy data filteringreturn_listfor returning a list of instrument data.frameslabelsfor adding/removing column labelsCurrently, you need to install the dev version of redquack:
pak::pak("dylanpieper/redquack").Todos
redquackupdates to CRAN