Yanafly 发表于 2017-10-31 07:19 
There are some obvious errors in this edition of "Forecasting: principles and practice", and I am no ...
Please take a look. This book is available online as well, and below is the content corresponding to the point you were raising.
https://www.otexts.org/fpp/4/7
There could be better functions/packages handling time series analysis, but I am sure in this case, lm() works just fine as well.