Estimates the percentage of core compaction using measurements
from a data.frame containing core properties. It computes a correction factor
based on sampler tube length, internal distance, and external distance, and
adds a 'compaction' column to the input data.frame with the calculated compaction
rate as a percentage.