This function does some simple looping to allow x and y to be various combinations of vectors and matrices/dataframes.

1 2 | ```
phenoDist(x, y = NULL, bins = 10, vectorDistFun = vectorWeightedDist,
...)
``` |

`x` |
A vector, matrix or dataframe |

`y` |
NULL, a vector, matrix, or dataframe. If x is a vector, y must also be specified. |

`bins` |
discretize continuous fields in the specified number of bins |

`vectorDistFun` |
A function of two vectors that returns the distance between those vectors. |

`...` |
Extra arguments passed on to vectorDistFun |

a matrix of distances between pairs of rows of x (if y is unspecified), or between all pairs of rows between x and y (if both are provided).

Levi Waldron, Markus Riester, Marcel Ramos

1 2 3 4 5 6 7 8 9 | ```
example("phenoFinder")
pdat1 <- pData(esets2[[1]])
pdat2 <- pData(esets2[[2]])
## Use phenoDist() to calculate a weighted distance matrix
distmat <- phenoDist(as.matrix(pdat1), as.matrix(pdat2))
## Note outliers with identical clinical data, these are probably the same patients:
graphics::boxplot(distmat)
``` |

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

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