matchTolerance | R Documentation |
This is a modified version of match
that supports tolerance.
matchTolerance(x, table) x %~% table
x |
the values to be matched |
table |
the values to be matched against |
A vector of the same length as x
x %~% table
: Helper function for checking inclusion in a table with tolerance
myDose <- c(rep(0.030, 6), rep(0.050, 3), rep(0.075, 4), rep(0.1, 9), rep(0.15, 7)) doseGrid <- seq(from = .025, to = .15, by = .005) myDose %in% doseGrid matchTolerance(myDose, doseGrid) myDose %~% doseGrid matchTolerance(c(myDose, 500), doseGrid) c(myDose, 500) %~% doseGrid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.