# Check your working directory
moddir = getwd()
# Here are some example MODIS files in modiscloud/extdata/
# Code excluded from CRAN check because it depends on modiscdata
## Not run:
# library(devtools)
# # The modiscdata (MODIS c=cloud data=data) package is too big for CRAN (60 MB); so it is available on github:
# # https://github.com/nmatzke/modiscdata
# # If we can't get install_github() to work, try install_url():
# # install_github(repo="modiscdata", username="nnmatzke")
# install_url(url="https://github.com/nmatzke/modiscdata/archive/master.zip")
# library(modiscdata)
# moddir = system.file("extdata/2002raw/", package="modiscdata")
#
# # You need to have some e.g. MOD files in it (from the MODIS-TERRA platform)
# # (*won't* work with the default files stored in modiscloud/extdata/2002raw/)
# list.files(path=moddir, pattern="MOD")
#
# # This directory actually has MYD files (from the MODIS-AQUA platform)
# # (*will* work with the default files stored in modiscloud/extdata/2002raw/)
# list.files(path=moddir, pattern="MYD")
#
# # Check for matches (for MODIS-TERRA platform)
# # (*won't* work with the default files stored in modiscloud/extdata/2002raw/)
# check_for_matching_geolocation_files(moddir=moddir, modtxt="MOD35_L2", geoloctxt="MOD03", return_geoloc=FALSE, return_product=FALSE)
#
# # Check for matches (for MODIS-AQUA platform)
# # (*will* work with the default files stored in modiscloud/extdata/2002raw/)
# check_for_matching_geolocation_files(moddir=moddir, modtxt="MYD35_L2", geoloctxt="MYD03", return_geoloc=FALSE, return_product=FALSE)
# ## End(Not run)
Run the code above in your browser using DataLab