In order to avoid error due to not selection all the required shapefiles files, I recommend creating a condition to the user upload all the files to load the shapefile. Although there is a description of how to import the files, sometimes users will try to upload sph. extension only.
Also recommend to shows up an error message when imported files are not correct. Otherwise, the app will crash all the time that there are wrong extension files uploaded.
[1] "C:/Users/leoag/AppData/Local/Temp/Rtmp2hAbLw/ed5b5a81ee9a75ce56ae7a7c/my_shp.shp"
Warning: Unable to open C:\Users\leoag\AppData\Local\Temp\Rtmp2hAbLw\ed5b5a81ee9a75ce56ae7a7c\my_shp.shx or C:\Users\leoag\AppData\Local\Temp\Rtmp2hAbLw\ed5b5a81ee9a75ce56ae7a7c\my_shp.SHX. Set SHAPE_RESTORE_SHX config option to YES to restore or create it. (GDAL error 4)
Warning: Error in : [vect] Cannot open this file as a SpatVector: C:\Users\leoag\AppData\Local\Temp\Rtmp2hAbLw\ed5b5a81ee9a75ce56ae7a7c\my_shp.shp
3: runApp
2: print.shiny.appobj
1: <Anonymous>
In order to avoid error due to not selection all the required shapefiles files, I recommend creating a condition to the user upload all the files to load the shapefile. Although there is a description of how to import the files, sometimes users will try to upload sph. extension only.
Also recommend to shows up an error message when imported files are not correct. Otherwise, the app will crash all the time that there are wrong extension files uploaded.