Given your description of your experimental design, some educated guesses that I'm making about your design, and your code snippet, I'd say that you are pretty far off the right track, unfortunately.
If your institution offers statistical consulting, or if you have access to statistically-knowledgeable support staff or faculty, then I recommend that you make use of that. This design appears to have blocking (section?) and subsamples (animals within groups?) and repeated measures (times within periods?), and it likely requires a fairly complicated statistical model, more complex than is really feasible to deal with in this Community forum.
I also suggest learning more about cross-over designs (of which Latin square is an example). Try "crossover design animal science" in your favorite search engine.
I hope this helps move you closer to the right track.