Can someone please help me fix the error:

```
library(lubridate)
arrival$Date<- as.Date(paste0(arrival$Date,"01"), format = "%YM%m%d")
arrival_ts <- ts(Actual.Countsnew, start= c(1921,04), end=c(2021, 05), frequency = 12)
```

```
library("forecast")
t <- time(arrival_ts)
lm1 <- tslm(arrival_ts ~ t)
tsforecast <- forecast(lm1, h=50)
**Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : object is not a matrix**
**'newdata' had 50 rows but variable found had 1 rowError in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : **
** object is not a matrix**
plot(tsforecast)
```

Thank you