Calculates the correlation for random pairs of observations

Sample tuples of elements from a set. The elements within a sampled tuple are unique, i.e. no two elements are the same.

1 2 | ```
## Default S3 method:
sampleTuples(x, size, length, ...)
``` |

`x` |
A set of elements to sample from. |

`size` |
The number of tuples to sample. |

`length` |
The length of each tuple. |

`...` |
Additional arguments passed to |

Returns a NxK `matrix`

where N = `size`

and K = `length`

.

Henrik Bengtsson

`sample`

().

1 2 3 4 5 6 7 8 9 | ```
pairs <- sampleTuples(1:10, size=5, length=2)
print(pairs)
triples <- sampleTuples(1:10, size=5, length=3)
print(triples)
# Allow tuples with repeated elements
quadruples <- sampleTuples(1:3, size=5, length=4, replace=TRUE)
print(quadruples)
``` |

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.