Learn R Programming

wrMisc (version 1.15.3.1)

.compareByDiff: Compare by distance/difference

Description

This function allows to compare by distance/difference

Usage

.compareByDiff(dat, limit, distVal = FALSE)

Value

This function returns a list with close matches of 'x' to given 'y', the numeric value dependes on 'sortMatch' (if FASLE then always value of 'y' otherwise of longest of x&y)

Arguments

dat

list of 2 numerical vectors

limit

(numeric, length=1) threshold value for retaining values, used with distace-type specified in argument 'compTy'

distVal

(logical) to toggle outpout as matrix of numeric (distance values above 'limit', others NA) or matrix of logical

See Also

findCloseMatch, checkSimValueInSer, and also .compareByLogRatio, for convient output countCloseToLimits

Examples

Run this code
cc <- list(aa=11:14, bb=c(13.1,11.5,14.3,20:21))

Run the code above in your browser using DataLab