added R utilities for making test data