Simple function to count the fraction of different elements (in the same position) between two vectors of the same length, after removing elements from both vectors corresponding to positions that are NA in either vector. Distance is the probability for observing the matches and mismatches in two random patients.

1 | ```
vectorWeightedDist(x, y, k, l)
``` |

`x` |
a matrix |

`y` |
a matrix with the same number of columns as x |

`k` |
row in x to test for differences |

`l` |
row in y to test for differences |

Returns a numeric value, the log of the probability of observing the matches in x and y

Levi Waldron, Markus Riester, Marcel Ramos

1 2 3 4 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.