# NOT RUN {
#Create a list of several raster objects to be displayed one after another
#If layer_type = RGB, use a brick class obejct with RGB bands!
data("basemap_data") #example MODIS dataset
layer <- basemap_data[[1]] #list of rasters
#Get your convert directory/command
conv_dir <- get_libraries()
#Specify the output directory, e.g.
out_dir <- "/out/test"
#Call animate_raster
animate_raster(layer,out_dir = out_dir, conv_dir = conv_dir, layer_type = "gradient",
out_format = "gif")
#use another file format for longer videos
animate_raster(layer,out_dir = out_dir, conv_dir = conv_dir, layer_type = "gradient",
out_format = "mov")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab