format
if length_out less than factor levels then returns subset of levels
cancelled factor now subset of levels if small length_out
renamed get_base_value as base
added is.POSIXt function and dropped lubridate dependency