Skip to content

Commit

Permalink
prep for CRAN resubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
ezraporter committed Aug 15, 2023
1 parent 7a40e69 commit 4ac4843
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
9 changes: 4 additions & 5 deletions R/checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,10 @@ check_repeat_and_nonrepeat <- function(db_data, call = caller_env()) {
# behavior in a given column and returns a boolean
check_data <- function(db_data, check_col) {
# Repeating Check
rep <- any(!is.na(db_data[{{ check_col }}]) &
!is.na(db_data["redcap_repeat_instrument"]))
rep <- any(!is.na(db_data[{{ check_col }}]) & !is.na(db_data["redcap_repeat_instrument"]))

# Nonrepeating Check
nonrep <- any(!is.na(db_data[{{ check_col }}]) &
is.na(db_data["redcap_repeat_instrument"]))
nonrep <- any(!is.na(db_data[{{ check_col }}]) & is.na(db_data["redcap_repeat_instrument"]))

rep & nonrep
}
Expand Down Expand Up @@ -299,8 +297,9 @@ check_req_labelled_metadata_fields <- function(supertbl, call = caller_env()) {
#' @importFrom cli cli_warn qty
#' @importFrom rlang caller_env
#'
#' @param parsed_labs a vector of parsed labels produced by `parse_labels()`
#' @param parsed_labels_output a vector of parsed labels produced by `parse_labels()`
#' @param field_name the name of the field associated with the labels to use in the warning message
#' @param warn_stripped_text logical for whether to include a note about HTML tag stripping in the message
#' @param call the calling environment to use in the error message. The parent of calling environment
#' by default because this check usually occurs 2 frames below the relevant context for the user
#'
Expand Down
4 changes: 2 additions & 2 deletions R/write.R
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ add_supertbl_toc <- function(wb,
#' a dataframe.
#'
#' @param supertbl a supertibble generated using `read_redcap()`
#' @param superbl_meta an `unnest`-ed metadata tibble from the supertibble
#' @param supertbl_meta an `unnest`-ed metadata tibble from the supertibble
#' @param wb An `openxlsx2` workbook object
#' @param add_labelled_column_headers Whether or not to include labelled outputs.
#' @param table_style Any excel table style name or "none" (see "formatting"
Expand Down Expand Up @@ -524,7 +524,7 @@ check_labelled <- function(supertbl, add_labelled_column_headers, call = caller_
#' changes in supertbl tables.
#'
#' @param supertbl A supertibble generated using `read_redcap()`
#' @param superbl_meta an `unnest`-ed metadata tibble from the supertibble
#' @param supertbl_meta an `unnest`-ed metadata tibble from the supertibble
#' @param add_labelled_column_headers Whether or not to include labelled outputs
#'
#' @importFrom dplyr mutate across case_when filter pull
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ There are no user-facing changes in this release.
1. [Ubuntu Linux 20.04.1 LTS, R-release, GCC](https://builder.r-hub.io/status/REDCapTidieR_0.4.0.9001.tar.gz-f853e048ec7949ed8b7de8b21bef7846)
2. [Fedora Linux, R-devel, clang, gfortran](https://builder.r-hub.io/status/REDCapTidieR_0.4.0.9001.tar.gz-cb2489664ff740b6a2f751757feb6c55)
3. [Windows Server](https://builder.r-hub.io/status/REDCapTidieR_0.4.0.9001.tar.gz-71108297d2fb4e5ea9a80e4eec49946d)
3. [win-builder](https://win-builder.r-project.org/EFDoel1TQ0VI/), development version.
3. [win-builder](https://win-builder.r-project.org/9L4v1qQ3188p/), development version.
4. [GiHub Actions](https://github.com/CHOP-CGTInformatics/REDCapTidieR/actions), Ubuntu 20.04.02 LTS

## R CMD check results:
Expand Down
4 changes: 2 additions & 2 deletions man/add_metadata_sheet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/check_parsed_labels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/supertbl_recode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions tests/testthat/test-extract_tibble.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ test_that("extract_tibbles works with a vector and tidyselect selectors", {
extract_tibbles(tbls = c("nonrepeated", "repeated")),
expected_traditional_out
)
expect_error(redcaptidier_longitudintal_db %>%
extract_tibbles(tbls = c("repeated", "fake_instrument_name")))
expect_error(extract_tibbles(redcaptidier_longitudintal_db, tbls = c("repeated", "fake_instrument_name")))

expect_error(extract_tibbles(123), class = "check_supertbl")
})
Expand Down

0 comments on commit 4ac4843

Please sign in to comment.