This function returns a data frame with interpolated data points.
interpolate(df, reference, sample_id)
A data frame contains CDF, the sample name, and the corresponding quantiles.
The object data frame requires interpolation.
The reference data frame to make comparison.
A character to denote the object data frame.
This is a function developed to do linear interpolation for corresponding probability from empirical cumulative distribution function (CDF) and corresponding quantiles. Given a reference data frame and a data frame needed to do interpolation, if there are any CDF values in reference but not in object data frame, do the linear interpolation and insert both CDF values and respective quantiles to the original object data frame.