Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
38ba5e3
implement redquack with parameters for filtering and returning a list
dylanpieper Jun 17, 2025
085cd5c
rename `filter_table` to `filter_function`
dylanpieper Jun 17, 2025
e0f2624
remove `for_env` vestige
dylanpieper Jun 17, 2025
4c8fe75
improve memory management and add trycatch for memory error
dylanpieper Jun 19, 2025
52e4d72
display progress bar only and warn/inform if large project
dylanpieper Jun 20, 2025
0644bc9
move `check_data_size` to inline
dylanpieper Jun 21, 2025
07ba51f
fix/add `return_list` to examples
dylanpieper Aug 16, 2025
680a222
add `dplyr::` to example for `filter_function`
dylanpieper Aug 17, 2025
b4dda55
fix cli deps
dylanpieper Aug 18, 2025
0847ddf
doc changes in 1.2
dylanpieper Aug 29, 2025
cafdf66
add `labels` parameter to `import_instruments()`
dylanpieper Aug 29, 2025
d5570b6
update package version to 1.2 and improve documentation
dylanpieper Aug 29, 2025
f83c794
Resolve conflicts with PR #74: enhance drop_label function and update…
dylanpieper Aug 29, 2025
e71f6d3
Migrate from labelVector to labelled package and update documentation
dylanpieper Aug 30, 2025
79facc6
Add keyring example to useAPI vignette and streamline documentation
dylanpieper Aug 30, 2025
7c17089
remove `select()` for duplicated colunmns no longer appended by `.1` …
dylanpieper Aug 30, 2025
5d8ec85
use proper version convention
dylanpieper Aug 30, 2025
48513ab
Fix vignette build errors by correcting object references
dylanpieper Aug 31, 2025
28dc4c2
Improve gitignore and fix markdown formatting in vignette
dylanpieper Aug 31, 2025
21cb5ef
Enhance makeInstrument vignette with NA demonstration
dylanpieper Aug 31, 2025
d43f071
simplify NA creation in `make_instrument()` vignette
dylanpieper Aug 31, 2025
7489df9
clarify `filter_function` param doc
dylanpieper Sep 9, 2025
33c798a
Add codebook() function for structured metadata documentation
dylanpieper Sep 9, 2025
c348459
Replace magrittr pipe with native R pipe and update dependencies
dylanpieper Sep 9, 2025
39fd88e
Add codebook_convert() function for converting REDCap coded values to…
dylanpieper Sep 9, 2025
cedf0fc
re-add docs for `make_yes_no_*` functions
dylanpieper Sep 9, 2025
183e668
fix namespacing for codebook S3 methods
dylanpieper Sep 9, 2025
0d828df
fixed typo
dylanpieper Sep 9, 2025
e963fc4
Enhance error handling in import_instruments function
dylanpieper Sep 10, 2025
c611042
Fix label preservation in make_yes_no functions
dylanpieper Sep 10, 2025
530dc54
Simplify error handling in import_instruments function
dylanpieper Sep 10, 2025
bc5bf9d
Fix C stack usage error in make_instrument functions
dylanpieper Sep 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
^\.travis\.yml$
^doc$
^Meta$
^\.claude$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ inst/doc
**/.DS_Store
doc
Meta
/doc/
/Meta/
15 changes: 12 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tidyREDCap
Title: Helper Functions for Working with 'REDCap' Data
Version: 1.1.2
Version: 1.2.0
Authors@R:
c(person(
given = "Raymond",
Expand Down Expand Up @@ -50,6 +50,13 @@ Authors@R:
role = "aut",
email = "kxg679@miami.edu",
comment = c(ORCID = "0000-0002-9223-8854")
),
person(
given = "Dylan",
family = "Pieper",
role = "aut",
email = "dylanpieper@gmail.com",
comment = c(ORCID = "0000-0002-2834-7351")
)
)
Description:
Expand All @@ -62,11 +69,13 @@ RoxygenNote: 7.3.2
Depends: R (>= 3.5.0)
Imports:
cli,
DBI,
dplyr,
duckdb,
janitor,
labelVector,
magrittr,
labelled,
purrr,
redquack,
REDCapR,
rlang,
stringr,
Expand Down
38 changes: 30 additions & 8 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Generated by roxygen2: do not edit by hand

S3method(codebook,data.frame)
S3method(codebook,default)
S3method(codebook_convert,data.frame)
S3method(codebook_convert,default)
S3method(vec_cast,character.labelled)
S3method(vec_cast,double.labelled)
S3method(vec_cast,integer.labelled)
Expand All @@ -18,9 +22,11 @@ S3method(vec_ptype2,labelled.integer)
S3method(vec_ptype2,labelled.labelled)
S3method(vec_ptype2,labelled.logical)
S3method(vec_ptype2,logical.labelled)
export("%>%")
export(codebook)
export(codebook_convert)
export(drop_label)
export(drop_labels)
export(has_redcap_values)
export(import_instruments)
export(make_binary_word)
export(make_choose_all_table)
Expand All @@ -29,37 +35,52 @@ export(make_instrument)
export(make_instrument_auto)
export(make_yes_no)
export(make_yes_no_unknown)
importFrom(DBI,dbConnect)
importFrom(DBI,dbDisconnect)
importFrom(REDCapR,redcap_metadata_read)
importFrom(REDCapR,redcap_read)
importFrom(REDCapR,redcap_read_oneshot)
importFrom(cli,cli_abort)
importFrom(cli,cli_alert_info)
importFrom(cli,cli_h1)
importFrom(cli,cli_inform)
importFrom(cli,cli_li)
importFrom(cli,cli_text)
importFrom(cli,cli_ul)
importFrom(cli,cli_warn)
importFrom(dplyr,across)
importFrom(dplyr,all_of)
importFrom(dplyr,bind_cols)
importFrom(dplyr,case_when)
importFrom(dplyr,collect)
importFrom(dplyr,count)
importFrom(dplyr,distinct)
importFrom(dplyr,filter)
importFrom(dplyr,if_else)
importFrom(dplyr,mutate)
importFrom(dplyr,pull)
importFrom(dplyr,rename)
importFrom(dplyr,select)
importFrom(dplyr,starts_with)
importFrom(dplyr,summarise_all)
importFrom(dplyr,sym)
importFrom(dplyr,tbl)
importFrom(duckdb,duckdb)
importFrom(janitor,adorn_pct_formatting)
importFrom(janitor,tabyl)
importFrom(labelVector,is_labelled)
importFrom(labelVector,set_label)
importFrom(magrittr,"%>%")
importFrom(labelled,"var_label<-")
importFrom(labelled,var_label)
importFrom(purrr,map_chr)
importFrom(purrr,map_df)
importFrom(purrr,map_lgl)
importFrom(redquack,redcap_to_db)
importFrom(rlang,"!!")
importFrom(rlang,.data)
importFrom(stringr,fixed)
importFrom(stringr,regex)
importFrom(stringr,str_count)
importFrom(stringr,str_detect)
importFrom(stringr,str_extract)
importFrom(stringr,str_locate)
importFrom(stringr,str_remove)
importFrom(stringr,str_remove_all)
importFrom(stringr,str_replace)
importFrom(stringr,str_replace_na)
importFrom(stringr,str_sub)
importFrom(tibble,enframe)
Expand All @@ -68,5 +89,6 @@ importFrom(tidyselect,ends_with)
importFrom(tidyselect,everything)
importFrom(tidyselect,starts_with)
importFrom(tidyselect,vars_select_helpers)
importFrom(utils,head)
importFrom(vctrs,vec_cast)
importFrom(vctrs,vec_ptype2)
185 changes: 109 additions & 76 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,149 +1,182 @@
---
editor_options:
markdown:
wrap: 72
---

# tidyREDCap 1.2 (CRAN release)

- Change import package to redquack
(<https://github.com/dylanpieper/redquack/tree/main/R>)
- Add parameters to function `import_instruments()`:
- `filter_instrument` and `filter_function` for lazy data
filtering
- `return_list` for returning a list of instrument data.frames
- `labels` for adding/removing column labels
- Add `codebook()` function for generating structured metadata
documentation
- Add `codebook_convert()` function for converting coded values to
labeled equivalents using stored metadata
- Add `has_redcap_values()` helper function for identifying columns
with REDCap value labels

# tidyREDCap 1.1.2 (CRAN release)

* Fix issues reported by CRAN with Linux and old R Windows (4.3.3) saying
- Fix issues reported by CRAN with Linux and old R Windows (4.3.3)
saying

```
```
✖ These names are duplicated:
* "record_id" at locations 1 and 2.
```

+ Update roxygen2 version (Thank you for Will Beasley)
+ Fix .data$ was depreciated in `tidyselect` (https://github.com/r-lib/tidyselect/issues/169)
+ Fixed missing global bindings caused by `tidyselect` fix.
- Update roxygen2 version (Thank you for Will Beasley)
- Fix .data\$ was depreciated in `tidyselect`
(<https://github.com/r-lib/tidyselect/issues/169>)
- Fixed missing global bindings caused by `tidyselect` fix.

# tidyREDCap 1.1.1 (CRAN release)

## New features

* Add `make_yes_no()` function to convert "checked" or "yes"-like answers to
"Yes" and other answers to "No or Unknown".
* Add `make_yes_no_unknown()` function to convert "checked" or "yes"-like
answers to "Yes", unchecked or "no"-like answers to "No" and other answers to
"Unknown".
- Add `make_yes_no()` function to convert "checked" or "yes"-like
answers to "Yes" and other answers to "No or Unknown".
- Add `make_yes_no_unknown()` function to convert "checked" or
"yes"-like answers to "Yes", unchecked or "no"-like answers to "No"
and other answers to "Unknown".

## Fixes/Changes
* `make_choose_all_table()` now works with api or manual/point-and-click
exports.
## Added S3 methods so dplyr (and friends) can work with labelled objects

# tidyREDCap 1.1.0 (CRAN release)
- `make_choose_all_table()` now works with api or
manual/point-and-click exports. \## Added S3 methods so dplyr (and
friends) can work with labelled objects

# tidyREDCap 1.1.0 (CRAN release)

## New features

* Add `drop_labels()` function for datasets. Used to deal with packages/functions
that don't want labeled variables (i.e. `dplyr::pivot_longer()` and `skimr::skim()`
* Added options (`record_id =` and `first_record_id =` for custom record_id fields in `import_instruments()`
* Added repeat instance numbers for repeated instruments in `import_instruments()`
- Add `drop_labels()` function for datasets. Used to deal with
packages/functions that don't want labeled variables (i.e.
`dplyr::pivot_longer()` and `skimr::skim()`
- Added options (`record_id =` and `first_record_id =` for custom
record_id fields in `import_instruments()`
- Added repeat instance numbers for repeated instruments in
`import_instruments()`

## Fixes/Changes

* Documentation fixes
+ Suppress warning caused by dplyr 1.1
+ fix wrong function in api vignette
- Documentation fixes
- Suppress warning caused by dplyr 1.1
- fix wrong function in api vignette

## Minor improvements and fixes

* Add unit test on import_instruments() function call.

- Add unit test on import_instruments() function call.

# tidyREDCap 1.0.1.9001 (dev version)
# tidyREDCap 1.0.1.9001 (dev version)

## Fixes/Changes

* Fixed bug that caused labels to be missing if they contained parentheses
- Fixed bug that caused labels to be missing if they contained
parentheses

# tidyREDCap 1.0.1.9000 (dev version)
# tidyREDCap 1.0.1.9000 (dev version)

## New features

* Add drop label function
- Add drop label function

## Fixes/Changes

* Fix message display bug while `import_instruments()` runs
* Fix bug with `import_instruments()` loading repeated instruments (the first instrument in a project was badly messed up)
* Row names no longer reflect the row number of the exported data
* Remove labels from a few automatically created REDCap variables ("record_id", "redcap_event_name", "redcap_repeat_instrument", "redcap_repeat_instance")

- Fix message display bug while `import_instruments()` runs
- Fix bug with `import_instruments()` loading repeated instruments
(the first instrument in a project was badly messed up)
- Row names no longer reflect the row number of the exported data
- Remove labels from a few automatically created REDCap variables
("record_id", "redcap_event_name", "redcap_repeat_instrument",
"redcap_repeat_instance")

# tidyREDCap 1.0.1 (CRAN release)
# tidyREDCap 1.0.1 (CRAN release)

## New features

* Added support for REDCapR API
- `import_instruments()` function imports all instruments with a single command
- Added targeted status messaging during the import

## Minor improvements and fixes
- Added support for REDCapR API
- `import_instruments()` function imports all instruments with a
single command
- Added targeted status messaging during the import

* `make_choose_one_table()` no longer requires factors
* `make_choose_all_table()` now works with "1" vs "0" indicator variables
* Greatly improved vignettes
## Minor improvements and fixes

# tidyREDCap 1.0.0.9002 (dev version)
- `make_choose_one_table()` no longer requires factors
- `make_choose_all_table()` now works with "1" vs "0" indicator
variables
- Greatly improved vignettes

* Add {REDCapR} support
* Added `import_instruments()` function to import all instruments; currently uses the `REDCapR` package as the API
# tidyREDCap 1.0.0.9002 (dev version)

- Add {REDCapR} support
- Added `import_instruments()` function to import all instruments;
currently uses the `REDCapR` package as the API

# tidyREDCap 1.0.0.9001 (dev version)
# tidyREDCap 1.0.0.9001 (dev version)

* Fix bug in `make_choose_all_table()` with repeating instruments showing NA counts
* Removes superseded `summarise_all()` function
- Fix bug in `make_choose_all_table()` with repeating instruments
showing NA counts
- Removes superseded `summarise_all()` function

# tidyREDCap 1.0.0.9000 (dev version)
# tidyREDCap 1.0.0.9000 (dev version)

* Removes superseded `mutate_if` and `mutate_all` from `make_choose_all_table()`
* Added `import_instruments()` function
* Added `make_instrument_auto()` function
* Adds checks on arguments
- Removes superseded `mutate_if` and `mutate_all` from
`make_choose_all_table()`
- Added `import_instruments()` function
- Added `make_instrument_auto()` function
- Adds checks on arguments

# tidyREDCap 0.2.2 (CRAN patch)
# tidyREDCap 0.2.2 (CRAN patch)

* Fix `rlang` bug in `make_choose_all_table()`; see <https://github.com/RaymondBalise/tidyREDCap/pull/13>
- Fix `rlang` bug in `make_choose_all_table()`; see
<https://github.com/RaymondBalise/tidyREDCap/pull/13>

# tidyREDCap 0.2.1 (CRAN release)
# tidyREDCap 0.2.1 (CRAN release)

* Fix bug with "" character stings with make_instrument()
- Fix bug with "" character stings with make_instrument()

# tidyREDCap 0.2.0 (CRAN release)

* Cleaned up vignettes, docs
- Cleaned up vignettes, docs

# tidyREDCap 0.1.3.1
# tidyREDCap 0.1.3.1

* Cleaned up vignettes, docs
- Cleaned up vignettes, docs

# tidyREDCap 0.1.3.0
# tidyREDCap 0.1.3.0

* Added `make_choose_all_table()` function
- Added `make_choose_all_table()` function

# tidyREDCap 0.1.2.1
# tidyREDCap 0.1.2.1

* Cleaned up vignettes
- Cleaned up vignettes

# tidyREDCap 0.1.2
# tidyREDCap 0.1.2

* Added `make_instrument()` function
- Added `make_instrument()` function

# tidyREDCap 0.1.1

* Added `make_choose_one_table()` function
- Added `make_choose_one_table()` function

# tidyREDCap 0.1.0 (CRAN release)

* Fixed title capitalization.
* Added reference to REDCap website.
* Updated the release year in the license.
* Updated hyperlinks to vignettes and example instrument description.
* Added references to financial support in the ReadMe.
- Fixed title capitalization.
- Added reference to REDCap website.
- Updated the release year in the license.
- Updated hyperlinks to vignettes and example instrument description.
- Added references to financial support in the ReadMe.

# tidyREDCap 0.0.0.9005

* Added check on number of arguments
- Added check on number of arguments

# tidyREDCap 0.0.0.9004

* Added a `NEWS.md` file to track changes to the package.


- Added a `NEWS.md` file to track changes to the package.
Loading