Fix in column names, now the 'time' dimension is properly named

By adding
 colnames(dat3)[length(cnames1) + 1] <- cnames2
the output has proper name for ‘time’ dimension
(cname2 is ‘time’ in most cases)

There is also a small fix in examples, recent version was not working.