Running examples in 'MODIS-Ex.R' failed
The error most likely occurred in:

> ### Name: getTile
> ### Title: Get MODIS Tile ID(s)
> ### Aliases: getTile getTile,missing,missing,missing-method
> ###   getTile,missing,charORnum,charORnum-method
> ###   getTile,character,ANY,ANY-method getTile,character-method
> ###   getTile,Raster,ANY,ANY-method getTile,Raster-method
> ###   getTile,map,ANY,ANY-method getTile,map-method
> ###   getTile,Extent,ANY,ANY-method getTile,Extent-method
> ###   getTile,bbox,ANY,ANY-method getTile,bbox-method
> ###   getTile,Spatial,ANY,ANY-method getTile,Spatial-method
> ###   getTile,sf,ANY,ANY-method getTile,sf-method
> 
> ### ** Examples
> 
> ## Not run: 
> ##D # ex 1 ############
> ##D # interactive tile selection
> ##D getTile()
> ##D getTile(mode = "draw")
> ## End(Not run)
> 
> # ex 2: Spatial (taken from ?rgdal::readOGR) ############
> dsn <- system.file("vectors/Up.tab", package = "rgdal")[1]
> Up <- rgdal::readOGR(dsn, "Up")
Warning in OGRSpatialRef(dsn, layer, morphFromESRI = morphFromESRI, dumpSRS = dumpSRS,  :
  Discarded datum South_American_Datum_1969 in Proj4 definition: +proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs
OGR data source with driver: MapInfo File 
Source: "D:\temp\RtmpQbrBbu\RLIBS_12d64592e278f\rgdal\vectors\Up.tab", layer: "Up"
with 81 features
It has 52 fields
> getTile(Up)
Error: Problem with `filter()` input `..1`.
i Input `..1` is `lengths(.predicate(x, y, ...)) > 0`.
x Evaluation error: Found 4 features with invalid spherical geometry.
[13] Loop 0 is not valid: Edge 1 crosses edge 6
[18] Loop 0 is not valid: Edge 0 crosses edge 5
[446] Loop 0 is not valid: Edge 1 crosses edge 4
[451] Loop 0 is not valid: Edge 2 crosses edge 5.
Backtrace:
     x
  1. +-MODIS::getTile(Up)
  2. +-MODIS::getTile(Up)
  3. | +-MODIS::getTile(sf::st_as_sf(x), ...)
  4. | \-MODIS::getTile(sf::st_as_sf(x), ...)
  5. |   +-base::suppressMessages(sf::st_filter(sr, x))
  6. |   | \-base::withCallingHandlers(...)
  7. |   +-sf::st_filter(sr, x)
  8. |   \-sf:::st_filter.sf(sr, x)
  9. |     +-dplyr::filter(x, lengths(.predicate(x, y, ...)) > 0)
 10. |     +-sf:::filter.sf(x, lengths(.predicate(x, y, ...)) > 0)
 11. |     | \-sf:::.re_sf(...)
 12. |     |   \-base::stopifnot(...)
 13. |     +-base::NextMethod()
 14. |     \-dplyr:::filter.data.frame(...)
 15. |       \-dplyr:::filter_rows(.data, ..., caller_env = caller_env())
 16. |         +-base::withCallingHandlers(...)
 17. |         \-mask$eval_all_filter(dots, env_filter)
 18. +-base::lengths(.predicate(x, y, ...))
 19. +-sf:::.predicate(x, y, ...)
 20. +-sf:::st_intersects.sf(x, y, ...)
 21. | \-sf:::st_geos_binop(...)
 22. |   \-s2:::fn(x, y, s2::s2_options(model = s2_model, ...))
 23. |     +-s2:::cpp_s2_intersects_matrix(...)
 24. |     +-s2::as_s2_geography(x)
 25. |     \-sf:::as_s2_geography.sf(x)
 26. |       \-sf:::st_as_s2.sf(x, ..., oriented = oriented)
 27. |         +-sf::st_as_s2(st_geometry(x), ...)
 28. |         \-sf:::st_as_s2.sfc(st_geometry(x), ...)
 29. |           +-s2::as_s2_geography(st_as_binary(x), ..., oriented = oriented)
 30. |           \-s2:::as_s2_geography.WKB(st_as_binary(x), ..., oriented = oriented)
 31. |             +-s2:::new_s2_xptr(...)
 32. |             \-s2:::s2_geography_from_wkb(x, oriented = oriented, check = check)
 33. +-base::stop(...)
 34. \-(function (e) ...
Execution halted