Just came across a little peculiarity (for myself), and it took me a while to understand the problem. Thus here for future reference
When using stack
on a named vector of Date (or POSIX) class, it fails:
vec_works <- setNames(letters, LETTERS)
head(stack(vec_works))
#> values ind
#> 1 a A
#> 2 b B
#> 3 c C
#> 4 d D
#> 5 e E
#> 6 f F
vec_fail <- as.Date(ISOdate(1, 1, 1:7))
names(vec_fail) <- weekdays(vec_fail)
stack(vec_fail)
#> Error in stack.default(vec_fail): at least one vector element is required