grapes-within-grapes: within

Description Usage Arguments Value Examples

Description

Determines if the values in summits fall between the columns of twoCol. Note that the columns in twoCol must be integer values and that the order has no impact.

Usage

1
summits %within% twoCol

Arguments

summits

A vector of numeric to be tested

towCol

Two columns the values of the vectors should fall between

Value

a vector of logical the same length as summits

Examples

1
2
3
4
5
6
7
8
summits<-c(1,10,100,200)
body<-rbind(c(0,2),c(1,10),c(11,9),c(201,199))
summits %within% body
# or
do.call("%within%",list(summits,body))
# if there are two rows and not two columns the body
# will automaticaly be transposed
(summits %within% t(body)) == (summits %within% body)

alexjgriffith/within documentation built on May 12, 2019, 12:29 a.m.