Find closest point(s) in a design or object.
Description
Find closest point(s) in a design matrix or object.
Usage
1 
Arguments
X 
A matrix containing design points as rows or a

XNew 
A vector or matrix containing one or several 'new' design points. 
... 
Other arguments for methods. 
Details
When X
has class "Grid"
weighting the factors
has no impact on the (or a) closest point since for each factor
there is normally one (and possibly two) level value(s) which
minimises the distance to the corresponding value in the given new
point (row) of XNew
.
Value
A list with elements
index 
Integer vector with length equal to the number of 'new' points. Contains
the index of the closest point in 
value 
Matrix with one row for each 'new' design point containing the
closest point as found in 
dist 
Numeric vector with length equal to the number of 'new' points. Contains the minimal distances. 
Examples
1 2 3 4 5 6 