Skip to content
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

Standalone updates #180

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion R/ard_attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ard_attributes <- function(data, variables = everything(), label = NULL) {
# check inputs ---------------------------------------------------------------
check_not_missing(data)
check_not_missing(variables)
check_class_data_frame(x = data)
check_data_frame(x = data)

# process arguments ----------------------------------------------------------
data <- dplyr::ungroup(data)
Expand Down
4 changes: 2 additions & 2 deletions R/ard_categorical.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ ard_categorical <- function(data,
# check inputs ---------------------------------------------------------------
check_not_missing(data)
check_not_missing(variables)
check_class_data_frame(x = data)
check_class(x = stat_labels, class = c("list", "formula"), allow_null = TRUE)
check_data_frame(x = data)
check_class(x = stat_labels, cls = c("list", "formula"), allow_empty = TRUE)
.check_no_ard_columns(data)

# process arguments ----------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions R/ard_complex.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ ard_complex <- function(data,
check_not_missing(data)
check_not_missing(variables)
check_not_missing(statistics)
check_class_data_frame(x = data)
check_class(x = statistics, class = c("list", "formula"), allow_null = FALSE)
check_data_frame(x = data)
check_class(x = statistics, cls = c("list", "formula"), allow_empty = FALSE)

# process inputs -------------------------------------------------------------
process_selectors(data, variables = {{ variables }})
Expand Down
8 changes: 4 additions & 4 deletions R/ard_continuous.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ ard_continuous <- function(data,
# check inputs ---------------------------------------------------------------
check_not_missing(data)
check_not_missing(variables)
check_class_data_frame(x = data)
check_class(x = statistics, class = c("list", "formula"), allow_null = TRUE)
check_class(x = stat_labels, class = c("list", "formula"), allow_null = TRUE)
check_class(x = fmt_fn, class = c("list", "formula"), allow_null = TRUE)
check_data_frame(x = data)
check_class(x = statistics, cls = c("list", "formula"), allow_empty = TRUE)
check_class(x = stat_labels, cls = c("list", "formula"), allow_empty = TRUE)
check_class(x = fmt_fn, cls = c("list", "formula"), allow_empty = TRUE)
.check_no_ard_columns(data)

# process arguments ----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion R/ard_dichotomous.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ard_dichotomous <- function(data,
# check inputs ---------------------------------------------------------------
check_not_missing(data)
check_not_missing(variables)
check_class_data_frame(x = data)
check_data_frame(x = data)

# process inputs -------------------------------------------------------------
process_selectors(data, variables = {{ variables }})
Expand Down
4 changes: 2 additions & 2 deletions R/ard_hierarchical.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ard_hierarchical <- function(data,
# check inputs ---------------------------------------------------------------
check_not_missing(data)
check_not_missing(variables)
check_class_data_frame(x = data)
check_data_frame(x = data)

# process arguments ----------------------------------------------------------
process_selectors(
Expand Down Expand Up @@ -107,7 +107,7 @@ ard_hierarchical_count <- function(data,
# check inputs ---------------------------------------------------------------
check_not_missing(data)
check_not_missing(variables)
check_class_data_frame(x = data)
check_data_frame(x = data)

# process arguments ----------------------------------------------------------
process_selectors(
Expand Down
6 changes: 2 additions & 4 deletions R/bind_ard.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@
#' bind_ard(ard, ard, .update = TRUE)
bind_ard <- function(..., .update = FALSE, .order = FALSE) {
# check inputs ---------------------------------------------------------------
check_class(.update, "logical")
check_scalar(.update)
check_class(.order, "logical")
check_scalar(.order)
check_scalar_logical(.update)
check_scalar_logical(.order)

# stack ARDs -----------------------------------------------------------------
data <- dplyr::bind_rows(...)
Expand Down
Loading
Loading