includes: Proportion of values in 'x' which are included in and...

Description Usage Arguments Details Value Examples

View source: R/tsum.R

Description

Count how many elements of vector 'x' are included in a given interval.

Usage

1
includes(x, lb, ub)

Arguments

x

should be an object of class "numeric"

lb

lower bound

ub

upper bound

Details

if an element is contained in the interval [lb,ub] it will be counted. https://www.varsitytutors.com/hotmath/hotmath_help/topics/interval-notation

Value

a single value indicating the proportion of elements in 'x' which are contained in a given interval [lb,ub]

Examples

1
2
3
4
5
## Not run: 
x <- rnorm(100)
includes(x, -1.8, 1.8)

## End(Not run)

femiguez/predintma documentation built on July 5, 2021, 4:16 a.m.