Skip to content

dimnames usage in ts (PR#1288)

1 message · Peter Dalgaard

#
"Timothy H. Keitt" <Timothy.Keitt@stonybrook.edu> writes:
You had me tempted to fix this for 1.4.1, but

a) There's more to it than meets the eye. As I read the code, it
cannot possibly have worked to do ts(dataframe) since we changed the
internal structure of lists some time in the 0.6x series! The
"obvious" fix tickled another bug whose fix tickled another, etc.

b) On closer inspection, the docs don't promise that you should be
able to do that. "Vector or matrix"... I wouldn't know whether
anything would actually be able to work on a data frame with a "tsp"
attribute. So the only option would be to insert an automatic
conversion to a matrix.

c) That would be a new feature, out of bounds the day before a
release. The workaround is trivial anyway:
   ts(as.matrix(dataframe))