Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

matchTolerance

Helper function for value matching with tolerance


Description

This is a modified version of match that supports tolerance.

Usage

matchTolerance(x, table)

x %~% table

Arguments

x

the values to be matched

table

the values to be matched against

Value

A vector of the same length as x

Functions

  • %~%: Helper function for checking inclusion in a table with tolerance

Examples

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

crmPack

Object-Oriented Implementation of CRM Designs

v1.0.0
GPL (>= 2)
Authors
Daniel Sabanes Bove [aut], Wai Yin Yeung [aut], Giuseppe Palermo [aut, cre], Thomas Jaki [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.