interval.check | R Documentation |
Check which interval a number belongs to
interval.check(data, input = "Stop", times, fun = "<=")
data |
data.frame |
input |
character name of column we wish to compare |
times |
vector in ascending order where the differences between sequential elements are the intervals |
fun |
character containing comparator |
This function takes in a data.frame with a specified column and compares that to a vector of times
Vector indicating which element of times
that row belongs to. If the row is beyond any element NA is in it's spot.
Jared P. Lander
head(cars)
interval.check(cars, input="speed", times=seq(min(cars$speed), max(cars$speed), length=10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.