test_range function

Test the range of a variable on a dataset