Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
You can't use Sample[i (which is just a single scalar) in the "dftr" function (the argument must be a vector or matrix).
You have to use the "submatrix" command!
EDIT: Ah, ttokoro was faster 😉
Here is a suggestion for doing it:
The results are
Note that the range i must run up to rows(Sample)-12 and not up to rows(Sample)-1 as in your attempt.
