View source: R/checkSimValueInSer.R

checkSimValueInSer | R Documentation |

This function checks all values of 'x' for similar neighbour values within (relative) range of 'ppm' (ie parts per milion as measure of distance).
By default values will be sorted internally, so if a given value of `x`

has anywhere in `x`

another value close enough, this will be detected.
However, if `sortX=FALSE`

only the values next to left and right will be considered.
Return logical vector : FALSE for each entry of 'x' if value inside of ppm range to neighbour (of sorted values)

```
checkSimValueInSer(
x,
ppm = 5,
sortX = TRUE,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
```

`x` |
numeric vector |

`ppm` |
(numeric, length=1) ppm-range for considering as similar |

`sortX` |
(logical) allows speeding up function when set to FALSE, for large data that are already sorted |

`silent` |
(logical) suppress messages |

`debug` |
(logical) additional messages for debugging |

`callFrom` |
(character) allow easier tracking of messages produced |

This function returns a logical vector : `TRUE`

for each entry of `x`

where at least one neighbour is inside of ppm distance/range

similar with more options `withinRefRange`

```
va1 <- c(4:7,7,7,7,7,8:10)+(1:11)/28600; checkSimValueInSer(va1)
data.frame(va=sort(va1),simil=checkSimValueInSer(va1))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.