I am trying to plot a time series for my TIFF stack MODIS EVI with the rts function.

I am trying to use this script but I do not know if I can use it for my TIFF stack.

path <- system.file("D:/Rteledetection/Pivots/MODIS", package="rts") # location of files

lst <- list.files(path=path,pattern='.asc$',full.names=TRUE) # in this line i'm usinf TIF in asc 
lst # list of raster files

I need some explanation if the function rts just for .asc format all for all format of raster

Can I use rts for my TIFF raster MODIS?


If you read the help for the rts function you will see:

      rts(x, time)

       x: A character vector including names of image/raster files, or
          ‘RasterStack’ or ‘RasterBrick’ object, or the name
          (character) of a raster time series file

So the first argument can be a list of names, or a RasterStack.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.