Skip to content

Commit

Permalink
Trim trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Aug 15, 2024
1 parent 5e8d6c5 commit 659f385
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/funs.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#' This is a shortcut for `x >= left & x <= right`, implemented for local
#' vectors and translated to the appropriate SQL for remote tables.
#'
#'
#' @details
#' `x`, `left`, and `right` are all cast to their common type before the
#' comparison is made. Use `ptype` argument to specify type manually.
Expand All @@ -15,7 +15,7 @@
#'
#' @returns
#' A logical vector the same size as `x`.
#'
#'
#' @seealso
#' [join_by()] if you are looking for documentation for the `between()` overlap
#' join helper.
Expand Down Expand Up @@ -48,18 +48,18 @@ between <- function(x, left, right, ptype = NULL) {
# Ensure x is also of type ptype
x <- vec_cast(x, ptype)
}

# Recycle to size of `x`
args <- vec_recycle_common(left = left, right = right, .size = vec_size(x))
left <- args$left
right <- args$right

left <- vec_compare(x, left)
left <- left >= 0L

right <- vec_compare(x, right)
right <- right <= 0L

left & right
}

Expand Down

0 comments on commit 659f385

Please sign in to comment.