You can try the ModisDownload()
function from the rts
package. Its last version allows for the needed NASA authentication prior to search and download. I believe that it is required now and the direct FTP download is not possible anymore. Even if I am wrong, this function provides a very rich set of tools to download and process MODIS imagery.
Its advantages include the possibility to mosaic and to reproject the raw .hdr
files downloaded (for the latter, you need to install the Modis Download Tool from NASA - link) to generate, say, a geotiff of all your tiles together.
To create your NASA user, go to https://urs.earthdata.nasa.gov/users/new
. Then try
devtools::install_github('babaknaimi/rts') # must install the latest one
library(rts)
setNASAauth("yourNASAlogin", "yourNASApassword", update = T) # authenticates at NASA's server
> username and password are successfully updated...!
Then to download the required images:
ModisDownload(x='MOD16A2',h=2,v=8,dates=c('2011.01.01','2011.01.31'), mosaic=F, proj=F)
This package allows actually to get any product available from MODIS analogously.