Skip to content

Commit

Permalink
Add ct assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiromagno committed Mar 27, 2024
1 parent 59bcc71 commit 7f9f388
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/ct.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ assert_ct <- function(ct) {
#' @keywords internal
ct_mappings <- function(ct, from = ct_vars("from"), to = ct_vars("to")) {

# TODO: Assertions and memoisation.
assert_ct(ct)

cols <- c(to, from)

Expand Down Expand Up @@ -182,6 +182,7 @@ ct_map <-
to = ct_vars("to")) {

ct %||% return(x)
assert_ct(ct)

cl <- cl %||% unique(ct[[ct_vars("cl")]])
ct <- dplyr::filter(ct, .data[[ct_vars("cl")]] %in% cl)
Expand Down

0 comments on commit 7f9f388

Please sign in to comment.