Adds functionality to apply formulae to data samples