I am trying to implement TWDTW model in R with dtwSat package. (You can find all the data here: https://www.jstatsoft.org/article/view/v088i05)
In page 12, the paper gives a method to produce a land cover map. As you can see on page 13, there is a tiff file called "doy.tif" consisting 'day of the year' value of all layers in an image. (For example, in a raster consisting of 8 date and 8 layers for each, it has values of days in each layer.) How can I produce such an image?