Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! 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.
