Construct a single "exemplar" record from a data frame. For now, all numeric
columns (including "Date" objects) are replaced with their
corresponding median value and non-numeric columns are replaced with their
most frequent value.
Usage
exemplar(object)
# S3 method for data.frame
exemplar(object)
# S3 method for matrix
exemplar(object)
# S3 method for dgCMatrix
exemplar(object)
Value
A data frame with the same number of columns as object and a
single row.
Arguments
object
A data frame, matrix, or
dgCMatrix (the latter two are
supported by xgboost).