Close open curve via projection on derivative level.
project_curve_on_closed(data_curve)
data_curve
data.frame
a data.frame with closed curve.
Useful links