add utility functions

melt.data.table
expand.args
segment
scale_daily, scale_year, scale_month