Replaced analyze.density_cut() with more general function data_slice()