between

0th

Percentile

Do values in a numeric vector fall in specified range?

This is a shortcut for x >= left & x <= right, implemented efficiently in C++ for local values, and translated to the appropriate SQL for remote tables.

Usage
between(x, left, right)
Arguments
x

A numeric vector of values

left, right

Boundary values

Aliases
  • between
Examples
library(dplyr) x <- rnorm(1e2) x[between(x, -1, 1)]
Documentation reproduced from package dplyr, version 0.5.0, License: MIT + file LICENSE

Community examples

shaunak1105@gmail.com at Nov 17, 2018 dplyr v0.7.8

**Load the libaries:** ``` library(nycflights13) library(tidyverse) ``` Now we have access to the flights dataset See the documentation : ``` ?flights ``` **Find flights departed BETWEEN 6am and 7 am (both inclusive)** ``` dplyr::filter(flights, between(flights$dep_time, 600, 700)) ```