File: between.Rd

package info (click to toggle)
r-cran-dplyr 1.0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,476 kB
  • sloc: cpp: 1,266; sh: 16; makefile: 9
file content (27 lines) | stat: -rw-r--r-- 643 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/funs.R
\name{between}
\alias{between}
\title{Do values in a numeric vector fall in specified range?}
\usage{
between(x, left, right)
}
\arguments{
\item{x}{A numeric vector of values}

\item{left, right}{Boundary values (must be scalars).}
}
\description{
This is a shortcut for \code{x >= left & x <= right}, implemented
efficiently in C++ for local values, and translated to the
appropriate SQL for remote tables.
}
\examples{
between(1:12, 7, 9)

x <- rnorm(1e2)
x[between(x, -1, 1)]

## Or on a tibble using filter
filter(starwars, between(height, 100, 150))
}