`sim()` generates a univariate reference sample by drawing values uniformly between the minimum and maximum of the input vector `Xcol`. This is used when creating reference datasets for computing the Gap statistic and other resampling-based clustering criteria.
sim(Xcol)Simulated uniform distribution