Description Usage Arguments Details Examples

Apply a function to all possible pairwise combinations of rows or columns.

1 | ```
pairwise(x, margin = 2, fun)
``` |

`x` |
A matrix class object or data.frame that can be coerced to a numeric matrix. |

`margin` |
Work on rows (1) or columns (2) |

`fun` |
The function to apply. Must be applicable to numeric data. |

The function must work on all rows (columns) provided. While a data.frame is accepted, it will be coerced to a matrix, and so its rows (columns) must be atomic vectors that are not character strings. While it might be expanded to be more flexible at some point, it should be thought of as a way to create things like distance or covariance matrices with arbitrary functions. At some point a parallel version will be added.

1 2 3 4 5 6 7 8 9 10 11 |

mclark--/lazerhawk documentation built on July 17, 2018, 3:11 a.m.

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.