x may contain NA for a gap. method is one of the book's own options: ffill, bfill, linear, mean, or seasonal. Leading or trailing gaps a method cannot reach fall back to the series mean, so the output never contains a hole.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_tsimpute(V)
#> $x
#> [1] 1 2 3 4 5 6 7 8
#>
#> $nmissing
#> [1] 0
#>
#> $n
#> [1] 8
#>
#> $mean
#> [1] 4.5
#>
#> $method
#> [1] "linear"
#>
#> $imputedmean
#> [1] NaN
#>
