Augments an existing Latin Hypercube Sample, adding points to the design, while
maintaining the *latin* properties of the design.

1 | ```
augmentLHS(lhs, m=1)
``` |

`lhs` |
The Latin Hypercube Design to which points are to be added |

`m` |
The number of additional points to add to matrix |

Augments an existing Latin Hypercube Sample, adding points to the design, while
maintaining the *latin* properties of the design. Augmentation is perfomed
in a random manner.

The algorithm used by this function has the following steps.
First, create a new matrix to hold the candidate points after the design has
been re-partitioned into *(n+m)^2* cells, where n is number of
points in the original `lhs`

matrix. Then randomly sweep through each
column (1...`k`

) in the repartitioned design to find the missing cells.
For each column (variable), randomly search for an empty row, generate a
random value that fits in that row, record the value in the new matrix.
The new matrix can contain more filled cells than `m`

unles *m = 2n*,
in which case the new matrix will contain exactly `m`

filled cells.
Finally, keep only the first m rows of the new matrix. It is guaranteed to
have `m`

full rows in the new matrix. The deleted rows are partially full.
The additional candidate points are selected randomly due to the random search
for empty cells.

An `n`

by `k`

Latin Hypercube Sample matrix with values uniformly distributed on [0,1]

Rob Carnell

Stein, M. (1987)
Large Sample Properties of Simulations Using Latin Hypercube Sampling.
*Technometrics*.
**29**, 143–151.

`randomLHS`

, `geneticLHS`

,
`improvedLHS`

, `maximinLHS`

, and
`optimumLHS`

to generate Latin Hypercube Samples.
`optAugmentLHS`

and `optSeededLHS`

to modify and augment existing designs.

1 2 3 | ```
a <- randomLHS(4,3)
a
augmentLHS(a, 2)
``` |

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.